Expand description
Encode and decode atlv values.
Algebraic Tag Length Value (atlv) is a binary data encoding designed for extensibility, generality, and compactness. Each value has a flexible-length tag, and may be one of four Kinds, two simple and two recursive:
- Quantities encode enumerable values, using Variable Length Quantities.
- Binaries encode sequences of bytes.
- Unions encapsulate a single value.
- Arrays encapsulate a sequence of values.
This crate provides a trait to encode and decode rust values directly into atlv streams, and a type to model and genericly encode and decode arbitrary atlv values. Use the trait unless you need to manipulate or examine unstructured atlv values.
Modules
- This module rexports the relevant pieces vlq_bij relevant to atlv.
Structs
- A decoding atlv stream in the process of decoding an array of values.
- A decoding atlv stream in the process of decoding a binary value.
- A decoding atlv stream at the beginning of a value.
- A decoding atlv stream just after the tag and kind have been decoded.
- A decoding atlv stream at the end of a value, and the value that was decoded.
- An encoding atlv stream in midst of an array of values.
- An encoding atlv stream in the midst of a binary value.
- An encoding atlv stream at the beginning of a value.
- An encoding atlv stream at the end of a value.
Enums
- Errors that can come up while parsing.
- The different kinds of
atlv
values. - A generic representation of an
atlv
value.
Constants
- This is the maximum length of an array that the builtin
Codec
implementations will accept. - This is the maximum number of bytes of binary that the builtin
Codec
implementations will accept.
Traits
- Types that are encodable and decodable with
atlv
.
Functions
- Decode a value from some reader.
- Encode a value to some writer.
- Generate arbitrary values of a type and test that encoding then decoding results in the original value.
Type Aliases
- A function that decodes a single value from an atlv stream.
- A function that encodes a single value to an atlv stream.