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