Skip to main content

Module stream

Module stream 

Source
Expand description

rANS stream types — RansEncoderStream / RansDecoderStream.

§rANS stream types

Standalone RansEncoderStream and RansDecoderStream matching Microsoft’s RansEncoderStream / RansDecoderStream from EntropyCoder.h.

  • Encoder stream keeps a persistent raw encoder state across push() calls (matching Microsoft’s RawRansEncoderStream), flushing once at the end.
  • Decoder stream owns the encoded data and advances a persistent decoder across sequential decode calls.

Both types are generic over the rANS variant (RansByte or Rans64), making variant mismatches a compile-time error.

Structs§

RansDecoderStream
rANS decoder stream for a specific variant S.
RansEncoderStream
rANS encoder stream for a specific variant S.

Enums§

RansVariant
rANS variants for runtime dispatch (Python-facing).

Functions§

units_to_le_bytes
Convert u32 units to little-endian bytes.