reallyme-codec
Rust codecs for base64, base64url, lowercase hex, multiformats, CBOR, CID, JCS, PEM, DER and definite TLV framing.
[]
= "0.4.4"
use ;
Base encodings, CBOR/JCS, multiformats and PEM are enabled by default.
Select fewer families with default-features = false. Optional features are
der, tlv, json, serde and operation-contract; serde supplies
base64url field adapters, while operation-contract enables serialized calls.
json::decode returns a bounded JSON document; json::from_slice projects it
into an owned Serde target. Duplicate names, invalid Unicode, trailing data and
exceeded limits return typed errors. Callers own input storage and copies made
by target deserializers.
base64::base64_to_bytes_with_limits accepts schema-defined independent input
and output budgets and returns Zeroizing<Vec<u8>>. The existing decoder's
encoded-input default remains 2,097,152 bytes. Standard padding and zero pad
bits are required.
DER decoding checks values against a caller-supplied schema. TLV framing only
checks outer headers and extents; it does not validate nested ASN.1 values.
CID parsing checks syntax, not content integrity. Use cbor::verify_dag_cbor_cid
when verification is required.
See API documentation for types, profiles and limits, and data handling for cleanup obligations.
License
MIT or Apache-2.0, at your option. See LICENSE.