Lz4Sequence structs describing the compressed
representation. The final sequence will have matchLen == 0.
Lz4Sequence[] findHCSequencesWithDict(
const(ubyte)[] src,
uint hashBits,
const(ubyte)[] dict
)Find sequences using a lazy matching algorithm (HC mode) with dictionary support.
This implements the LZ4 High Compression (HC) strategy used for levels 7-9, extended to support dictionary-based compression. Unlike greedy matching, lazy matching defers the decision to emit a match: after finding a match at position P, it checks if position P+1 has a longer match. If so, the byte at P is emitted as a literal and the better match at P+1 is used instead.
When a dictionary is provided, it is treated as data that precedes the source. Matches can reference positions in the dictionary.
src | Input data to compress. |
hashBits | Number of hash bits for the table (determines table size). |
dict | Optional dictionary data (may be null or empty). |
Lz4Sequence structs describing the compressed
representation. The final sequence will have matchLen == 0.