|0.2.13||Apr 26, 2022|
|0.2.12||Apr 15, 2022|
|0.2.8||Mar 28, 2022|
|0.2.6||Jan 24, 2022|
|0.1.0||Dec 9, 2021|
#242 in Encoding
16,615 downloads per month
Used in 44 crates (2 directly)
CBOR 0x(4+4)9 0x49
“The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.”
core mod should be fully compatible with rfc8949,
but some extensions will not be implemented in this crate,
serde mod defines how Rust types should be expressed in CBOR,
which is not any standard,
so different crate may have inconsistent behavior.
This library is intended to be compatible with
but will not follow some unreasonable designs of
cbor4iiwill express the unit type as an empty array instead of null. This avoids the problem that
serde_cborcannot distinguish between
Some(()). see https://github.com/pyfisch/cbor/issues/185
cbor4iidoes not support packed mode, and it may be implemented in future, but it may not be compatible with
serde_cbor. If you want packed mode, you should look at
It is not specifically optimized for performance in implementation,
but benchmarks shows that its performance is slightly better than
And it supports zero-copy deserialization and
deserialize_ignored_any of serde,
so in some scenarios it may perform better than crate that do not support such feature.
The decode part has been fuzz tested, and it should not crash or panic during the decoding process.
The decode of serde module has a depth limit
to prevent stack overflow or OOM caused by specially constructed input.
If you want to turn off deep inspection or adjust parameters,
you can implement the
dec::Read trait yourself.
This project is licensed under the MIT license.