gaia-binary 0.1.1

Binary encoding and decoding for Gaia project
Documentation
  • Coverage
  • 100%
    110 out of 110 items documented0 out of 102 items with examples
  • Size
  • Source code size: 45.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 37s Average build duration of successful builds.
  • all releases: 38s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • nyar-vm/project-gaia
    7 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fqq

gaia-binary

Binary encoding and decoding for the Gaia project.

Features

  • Generic binary reader and writer with position tracking.
  • Support for fixed-size encoding with specific byte orders (Big Endian, Little Endian).
  • Support for variable-length encoding (LEB128).
  • ZigZag transformation for signed integers.
  • Zero external dependencies (manually implemented byte order logic).

Architecture

The crate is structured around the BinaryFormat trait, which defines how basic types are read and written. Implementations include:

  • Fixed<E>: Fixed-size encoding using byte order E.
  • Leb128<E>: Variable-length encoding.
  • ZigZag<F>: Wraps another format to apply ZigZag encoding to signed integers.

BinaryReader and BinaryWriter wrap any type implementing Read or Write and provide high-level methods for reading and writing data using a chosen BinaryFormat.