Skip to main content

Module bitio

Module bitio 

Source
Expand description

Byte- and bit-level serialization primitives.

Everything the codec emits goes through ByteWriter, so the length of its buffer is the bit account: there is no side channel.

Structs§

BitReader
Reader for BitWriter output.
BitWriter
LSB-first bit packer for raw (uniformly distributed) extra bits.
ByteReader
Cursor over a byte slice, mirroring ByteWriter.
ByteWriter
Append-only byte buffer with LEB128 varints.

Enums§

DecodeError
Errors raised while parsing a bitstream.

Functions§

unzigzag
Inverse of zigzag.
zigzag
Signed → unsigned interleaving (0, -1, 1, -2, …).