|
19 | 19 | A pure-rust implementation of AMF0 encoder and decoder. |
20 | 20 |
|
21 | 21 | This crate provides serde support for serialization and deserialization of AMF0 data. |
22 | | -## Specification |
23 | 22 |
|
24 | | -| Name | Version | Link | Comments | |
25 | | -| --- | --- | --- | --- | |
26 | | -| Action Message Format -- AMF 0 | - | <https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf> | Refered to as 'AMF0 spec' in this documentation | |
| 23 | +See the [changelog](./CHANGELOG.md) for a full release history. |
27 | 24 |
|
28 | | -## Limitations |
| 25 | +### Feature flags |
29 | 26 |
|
30 | | -- Does not support AMF0 references. |
31 | | -- Does not support the AVM+ Type Marker. (see AMF 0 spec, 3.1) |
| 27 | +* **`serde`** — Enables serde support |
| 28 | +* **`docs`** — Enables changelog and documentation of feature flags |
| 29 | +* **`preserve_order`** — Use an index map instead of a btree-map for Amf0Objects |
32 | 30 |
|
33 | | -## Example |
| 31 | +### Specification |
34 | 32 |
|
35 | | -```rust |
36 | | -# fn test() -> Result<(), Box<dyn std::error::Error>> { |
37 | | -# let bytes = &[0x02, 0, 1, b'a']; |
38 | | -# let mut writer = Vec::new(); |
| 33 | +|Name|Version|Link|Comments| |
| 34 | +|----|-------|----|--------| |
| 35 | +|Action Message Format – AMF 0|-|<https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf>|Refered to as ‘AMF0 spec’ in this documentation| |
| 36 | + |
| 37 | +### Limitations |
| 38 | + |
| 39 | +* Does not support AMF0 references. |
| 40 | +* Does not support the AVM+ Type Marker. (see AMF 0 spec, 3.1) |
| 41 | + |
| 42 | +### Example |
| 43 | + |
| 44 | +````rust |
39 | 45 | // Decode a string value from bytes |
40 | 46 | let value: String = scuffle_amf0::from_slice(bytes)?; |
41 | 47 |
|
42 | 48 | // .. do something with the value |
43 | 49 |
|
44 | 50 | // Encode a value into a writer |
45 | 51 | scuffle_amf0::to_writer(&mut writer, &value)?; |
46 | | -# assert_eq!(writer, bytes); |
47 | | -# Ok(()) |
48 | | -# } |
49 | | -# test().expect("test failed"); |
50 | | -``` |
| 52 | +```` |
51 | 53 |
|
52 | | -## License |
| 54 | +### License |
53 | 55 |
|
54 | 56 | This project is licensed under the MIT or Apache-2.0 license. |
55 | 57 | You can choose between one of them if you use this work. |
|
0 commit comments