Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
💎 bijoux
Bijoux — bijective, length-prefixed variable-length integer encodings, one canonical format per integer type.
The name is a double reading: bijouX, with X ranging over the
widths (bijou32, bijou64, bijou128, …), and the French plural — the
crate that holds all of the bijous.
Each width is a module gated by a feature (all enabled by default), and
the Encode / Decode traits are implemented directly on the integer
types:
use ;
let mut buf = Vecnew;
300u64.encode;
let = u64decode.unwrap;
assert_eq!;
// Or via the per-width free functions:
encode;
| Module / feature | Wire format | Max bytes | Spec |
|---|---|---|---|
bijoux::i32 |
bijou32s | 5 | specs/bijou32s.md |
bijoux::i64 |
bijou64s | 9 | specs/bijou64s.md |
bijoux::i128 |
bijou128s | 17 | specs/bijou128s.md |
bijoux::u32 |
bijou32 | 5 | specs/bijou32.md |
bijoux::u64 |
bijou64 | 9 | specs/bijou64.md |
bijoux::u128 |
bijou128 | 17 | specs/bijou128.md |
The signed format (bijoux::i64) is standard zigzag over the bijou64
tier scheme: 1 byte for [-124, +123], canonical, but byte order is
zigzag order rather than numeric order — don't use it for memcomparable
keys.
no_std (uses alloc), #![forbid(unsafe_code)].
License
Code is MIT OR Apache-2.0. The encoding specifications
(specs/) are CC BY-SA 4.0.