lz4CompressBlockGreedy
private fn
ubyte[] lz4CompressBlockGreedy(const(ubyte)[] src, uint hashBits)Compress a block using greedy matching in a single pass.
This fuses match-finding and LZ4 block encoding into one pass, eliminating the intermediate Lz4Sequence[] array. This avoids GC pressure from dynamic array allocations and improves cache locality by writing the compressed output directly.
The heavy lifting is delegated to lz4CompressBlockGreedyCore, which is marked @nogc nothrow so LDC can optimise the hot loop without GC safepoint polls or exception-unwinding overhead.
Parameters
src | Input data to compress. |
hashBits | Number of hash bits for the match-finder table. |
Returns
Newly allocated array containing the LZ4-compressed block.