Capstan.Zstd.BitReader.Reverse (Capstan v1.3.2)

Copy Markdown View Source

The MSB-first, last-byte-first bit reader — see the parent module's moduledoc for the RFC 8878 conventions it implements. Internal to the zstd decoder.

Summary

Functions

Bits in READING order. The padding 1 bit (and the zero padding above it) in the last byte is skipped: it terminates the stream, never decoded.

Types

t()

@type t() :: %Capstan.Zstd.BitReader.Reverse{bits: tuple(), pos: non_neg_integer()}

Functions

new(bin)

Bits in READING order. The padding 1 bit (and the zero padding above it) in the last byte is skipped: it terminates the stream, never decoded.

peek(r, n)

read(r, n)

read_exact(r, n)

@spec read_exact(t(), non_neg_integer()) ::
  {:ok, non_neg_integer(), t()} | {:error, :bitstream_exhausted}

read_padded(r, n)

remaining(reverse)