compressBlockFast
private fn
size_t compressBlockFast(const(ubyte)[] src, ubyte[] outBuf) @trustedFast single-pass compression core using raw pointers.
Fuses match-finding and encoding to eliminate intermediate allocations and reduce function call overhead. Uses malloc'd uint hash table (256 KB instead of 512 KB size_t) to reduce cache pressure.
Parameters
src | Input data. |
outBuf | Pre-allocated output buffer (must be large enough). |
Returns
Number of bytes written to output (0 for empty input).
Throws
CompressionError with MEMORY_ERROR if the hash table allocation fails.
A zero return therefore always means "empty input", never an error.