Skip to main content

Module strategy

Module strategy 

Source
Expand description

Level parameters: the settings each level runs with, and how the input size and Options adjust them.

Structs§

LdmParams
Parameters for Long Distance Matching.
LevelParams
Compression parameters for a specific level.
Options
Options for large-window and LDM compression, orthogonal to level.

Enums§

Strategy
Match-finding strategy.

Constants§

DEFAULT_LEVEL
Default compression level used when level 0 is requested.
HASH_LOG_MAX
Largest hash or chain log.
HASH_LOG_MIN
Smallest hash or chain log, a 64-entry table.
MAX_LEVEL
Highest compression level.
MIN_LEVEL
Lowest compression level. Level -8, a separate level in earlier versions, is still accepted and runs as -7.
WINDOW_LOG_MAX
Largest window log, a 128 MiB window.
WINDOW_LOG_MIN
Smallest window log, a 1 KiB window.

Functions§

apply_options
Applies opts to params: the window log, clamped to WINDOW_LOG_MIN..=WINDOW_LOG_MAX, and with LDM on, a 2^27-byte window unless set and LdmParams sized for the window.
level_params
Returns the compression parameters for a given level, or None if out of range.
level_params_for_size
Returns the compression parameters for a given level, sized for src_len.