ZXC 1.0.3
High-performance asymmetric lossless compression library
Loading...
Searching...
No Matches
Dictionary

Constants for pre-trained dictionary support. More...

Macros

#define ZXC_DICT_SIZE_MAX   ((1U << 16) - 1U)
 Maximum dictionary content size in bytes (64 KB - 1).
#define ZXC_DICT_MAGIC   0x9CB0D1C7U
 Magic word opening a .zxd dictionary file, stored little-endian (C7 D1 B0 9C).
#define ZXC_DICT_HEADER_SIZE   16
 Size of the .zxd dictionary file header in bytes.
#define ZXC_HUF_TABLE_SIZE   128
 Size of a packed literal Huffman code-lengths table (256 symbols, 4 bits each): the shared table in a .zxd file, and internally the per-block lengths header.

Detailed Description

Constants for pre-trained dictionary support.

Macro Definition Documentation

◆ ZXC_DICT_HEADER_SIZE

#define ZXC_DICT_HEADER_SIZE   16

Size of the .zxd dictionary file header in bytes.

Definition at line 92 of file zxc_constants.h.

Referenced by zxc_dict_huf(), zxc_dict_load(), zxc_dict_read_id(), zxc_dict_save(), and zxc_dict_save_bound().

◆ ZXC_DICT_MAGIC

#define ZXC_DICT_MAGIC   0x9CB0D1C7U

Magic word opening a .zxd dictionary file, stored little-endian (C7 D1 B0 9C).

Definition at line 90 of file zxc_constants.h.

Referenced by zxc_dict_huf(), zxc_dict_load(), zxc_dict_read_id(), and zxc_dict_save().

◆ ZXC_DICT_SIZE_MAX

#define ZXC_DICT_SIZE_MAX   ((1U << 16) - 1U)

Maximum dictionary content size in bytes (64 KB - 1).

16-bit for two reasons that happen to cap at the same 65535: the .zxd header stores the content size in a 16-bit field, and LZ77 match offsets are 16-bit (max distance 65535).

Definition at line 88 of file zxc_constants.h.

Referenced by zxc_dict_copy_set(), zxc_dict_load(), zxc_dict_save(), zxc_dict_train(), zxc_dict_train_content(), zxc_dict_train_huf(), and zxc_seekable_set_dict().

◆ ZXC_HUF_TABLE_SIZE

#define ZXC_HUF_TABLE_SIZE   128

Size of a packed literal Huffman code-lengths table (256 symbols, 4 bits each): the shared table in a .zxd file, and internally the per-block lengths header.

See zxc_dict_train_huf() / zxc_dict_huf().

Definition at line 96 of file zxc_constants.h.

Referenced by zxc_cctx_attach_dict_huf(), zxc_ctx_sync_dict_huf(), zxc_dict_compute_id(), zxc_dict_copy_set(), zxc_dict_huf(), zxc_dict_load(), zxc_dict_save(), zxc_dict_save_bound(), zxc_dict_train(), zxc_dict_train_huf(), zxc_huf_calc_size(), zxc_huf_decode_section(), zxc_pivco_encode_core(), and zxc_seekable_set_dict().