Expand description
DEFLATE full-flush boundary scanner.
A Z_FULL_FLUSH point resets the LZ77 back-reference window to empty, making all bytes that follow independently decompressible. In the compressed byte stream this always produces the 5-byte sequence:
00 BFINAL=0, BTYPE=00 (stored), 5 padding zero-bits 00 00 LEN = 0x0000 (zero-length stored block) FF FF NLEN = 0xFFFF (one’s complement)
We scan for the 4-byte LEN+NLEN pattern 00 00 FF FF. The next
independently-decompressible segment starts at match_pos + 4.
Mirrors lbzip2-rs block_scan.rs: parallel candidate-offset forward-scan, one task per physical core, no look-behind verification (Q1 resolved).
Structs§
- Flush
Boundary - A full-flush boundary.
Functions§
- find_
all_ flushes - Find all full-flush boundaries in
buf. - find_
next_ flush - Scan forward from
fromfor the next00 00 FF FFpattern. - split_
boundaries_ parallel - Parallel split-point search: N−1 rayon tasks each find the nearest flush boundary at or after their nominal byte offset.