Skip to Content
The Alchemy Project

struct LZ_PACK_STATE

The LZ packer's state: a node per window position, a chain head per byte value, the byte at each position, the best match and the output.

Declared in lucky_wheels_lzpack.h.

Fields

NameDescription
LZ_PACK_NODEnodes [1024]one per window position
LZ_PACK_NODE *bucket [256]each byte value's chain, or null
Sint32flagMaskthe flag bit of the next item, 0x80 first
Sint32windowBytes [1024]each position's byte; -1 past the input
Sint32outCountbytes of outBuf in use
Uint8outBuf [36]group being built: its flag byte, then up to eight items
Sint32matchOffsetthe best match's distance back (fdLZPackFindWindowMatch)
Sint32matchLenits length; 1 for none
Sint32posthe window position being packed
Uint32inputCursorinput bytes read into the window
Sint32outTotalbytes written to the output
Uint32inputLimitthe input's size

Description

The LZ packer's state: a node per window position, a chain head per byte value, the byte at each position, the best match and the output.

struct LZ_PACK_STATE

Referenced by fdLZPackConsumeSlotBytes(), fdLZPackCopyBufferedBytes(), fdLZPackInsertSlotNode() and fdLZPackPackStream().

Definition at line 23 of file lucky_wheels_lzpack.h.

Fields in detail

nodes

LZ_PACK_NODE nodes[1024]

one per window position

bucket

LZ_PACK_NODE *bucket[256]

each byte value's chain, or null

flagMask

Sint32 flagMask

the flag bit of the next item, 0x80 first

windowBytes

Sint32 windowBytes[1024]

each position's byte; -1 past the input

outCount

Sint32 outCount

bytes of outBuf in use

outBuf

Uint8 outBuf[36]

group being built: its flag byte, then up to eight items

matchOffset

Sint32 matchOffset

the best match's distance back (fdLZPackFindWindowMatch)

matchLen

Sint32 matchLen

its length; 1 for none

pos

Sint32 pos

the window position being packed

inputCursor

Uint32 inputCursor

input bytes read into the window

outTotal

Sint32 outTotal

bytes written to the output

inputLimit

Uint32 inputLimit

the input's size