Module: LZW::Constants

Included in:
Compressor, Decompressor
Defined in:
lib/lzw/constants.rb

Constant Summary collapse

MAGIC =

byte 1-2: static magic

"\037\235".b
MASK_BITS =

byte 3: mask for max_code_size

0x1f
MASK_BLOCK =

byte 3: mask for block_mode

0x80
RESET_CODE =

block mode: reserved code: reset code table

256
BL_INIT_CODE =

block mode: first available code

257
NR_INIT_CODE =

normal mode: first available code

256
INIT_CODE_SIZE =

initial code size after header

9
CHECKPOINT_BITS =

block mode: check for falling compression

10_000