Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_jdat/src/bdat/mod.rs

1012 bytes, 2 runs

created by r1870400018:13477, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1//! BDAT, the binary encoding of JDAT, standing to JDAT as BSON does to JSON.
2//!
3//! Every value begins with a kind byte, and every list, map, tuple or vek declares the byte length
4//! of its contents, so a subtree occupies a contiguous, self-delimiting run of bytes that a reader
5//! can step over with a single seek rather than decoding it.
6//!
7//! BDAT is a serialisation rather than a container. The bytes begin with the kind byte of whatever
8//! value was handed to the encoder, with no magic number, no version field, no index and no
9//! signature, and the same logical value may encode differently, since 42 may be held as a `u8` or
10//! an `i32`. An application wanting a file format supplies those things itself, declaring a version,
11//! fixing one legal encoding so that a hash of the bytes is a stable identity, and wrapping the
12//! result in whatever envelope its trust model needs.
13
14pub mod core;
15pub mod count;
16pub mod dec;
17pub mod enc;
18pub mod limits;
19pub mod load;
20
21pub use limits::DecodeLimits;