Conversation
three gaps between "works" and "complete", closed together. multi-member: concatenated gzip streams (cat a.gz b.gz) decompress to their concatenated payloads with each member's crc32 and length trailer verified, as gunzip does. inflate now reports where a stream ends so the reader knows where the next member's header starts, and the trailer length compares mod 2^32, matching the format's isize field for payloads past 4gb. stored fallback: fixed huffman gives half the byte alphabet 9-bit codes, so truly incompressible data used to expand. deflate now encodes both ways and keeps the smaller — 8k of /dev/urandom costs 23 bytes of framing instead of ~5% growth. zlib: routed through the same inflate and deflate engine with the adler32 trailer verified — real compression instead of stored blocks, and python's zlib module reads the output directly. the multi-member work exposed a std bug: ByteBuffer.write of empty bytes reported failure, because the builtin returns bytes written and the result convention reads zero as an error. an empty write is now a no-op in the wrapper. a committed two-member fixture and extended interop regression pin all of it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
the push from ~85% to ~95% gzip completeness, one PR:
cat a.gz b.gzdecompresses to concatenated payloads, per-member crc32/length verified (inflate now reports stream end positions; trailer length compares mod 2³² for >4gb correctness)./dev/urandomcosts 23 framing bytes instead of ~5% growth.the bug it exposed
ByteBuffer.write(empty)reported failure — the builtin returns bytes-written and the result convention reads 0 as error. now a no-op in the wrapper.what was tested
committed two-member fixture; extended interop regression (multi-member, zlib round-trip, shrink assertions); full-range-random fallback verified; full suite green including std in-module tests, all interop checks, fixed point, seed refresh.