Crates.io | amf |
lib.rs | amf |
version | 1.0.0 |
source | src |
created_at | 2016-10-28 17:26:24.058821 |
updated_at | 2022-02-03 10:08:16.481583 |
description | A Rust Implementation of AMF (Action Media Format) |
homepage | https://github.com/sile/amf |
repository | https://github.com/sile/amf |
max_upload_size | |
id | 7027 |
size | 176,692 |
A Rust Implementation of AMF (Action Media Format).
Following code decodes a AMF0 encoded value read from the standard input:
// file: examples/decode_amf0.rs
extern crate amf;
use std::io;
use amf::{Value, Version};
fn main() {
let mut input = io::stdin();
let amf0_value = Value::read_from(&mut input, Version::Amf0).unwrap();
println!("VALUE: {:?}", amf0_value);
}
An execution result:
$ cat src/testdata/amf0-number.bin | cargo run --example decode_amf0
VALUE: Amf0(Number(3.5))