fn decodeBlock(dest: []u8, src: []const u8, block_header: frame.Zstandard.Block.Header, decode_state: *DecodeState, consumed_count: *usize, block_size_max: usize, written_count: usize) error{DestTooSmall} || Error!usize
[src]
Decode a single block from src
into dest
. The beginning of src
must be the start of the block content (i.e. directly after the block header). Increments consumed_count
by the number of bytes read from src
to decode the block and returns the decompressed size of the block.
Errors returned:
error.BlockSizeOverMaximum
if block’s size is larger than 1 << 17 ordest[written_count..].len
error.MalformedBlockSize
ifsrc.len
is smaller than the block size and the block is a raw or compressed blockerror.ReservedBlock
if the block is a reserved blockerror.MalformedRleBlock
if the block is an RLE block andsrc.len < 1
error.MalformedCompressedBlock
if there are errors decoding a compressed blockerror.DestTooSmall
isdest
is not large enough to hold the decompressed block
Parameters
dest: []u8,
src: []const u8,
decode_state: *DecodeState,
consumed_count: *usize,
block_size_max: usize,
written_count: usize,