fn prepare(self: *DecodeState, source: anytype, literals: LiteralsSection, sequences_header: SequencesSection.Header) !void
[src]
Prepare the decoder to decode a compressed block. Loads the literals stream and Huffman tree from literals
and reads the FSE tables from source
.
Errors returned:
error.BitStreamHasNoStartBit
if the (reversed) literal bitstream’s first byte does not have any bits seterror.TreelessLiteralsFirst
literals
is a treeless literals section and the decode state does not have a Huffman tree from a previous blockerror.RepeatModeFirst
on the first call if one of the sequence FSE tables is set to repeat modeerror.MalformedAccuracyLog
if an FSE table has an invalid accuracyerror.MalformedFseTable
if there are errors decoding an FSE tableerror.EndOfStream
ifsource
ends before all FSE tables are read
Parameters
self: *DecodeState,
source: anytype,
literals: LiteralsSection,
sequences_header: SequencesSection.Header,