+ add ShrinkIt NuLZW building block - #126
Merged
Merged
Conversation
Hawkynt
force-pushed
the
feat/shrinkit-nulzw-building-block
branch
4 times, most recently
from
August 30, 2026 01:13
799bf69 to
e8f610b
Compare
NuLZW as ShrinkIt writes it: 12-bit codes, the clear that resets the table, and the per-block framing the format wraps around them. The encoder held its running prefix in a byte, so the first code past 255 would not go back into it.
Hawkynt
force-pushed
the
feat/shrinkit-nulzw-building-block
branch
from
August 30, 2026 01:24
e8f610b to
2e61a49
Compare
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.
What changed
Adds the Apple II NuFX/ShrinkIt RLE + LZW primitive to
Compression.Core.Dictionary.Lzw.NuLzwCodecimplements both native ShrinkIt dialects:0xDBby default), including delimiter escaping and 256-byte runs0x100clear code and the rare dictionary-full-at-block-boundary deferred-clear caseA benchmarkable
NuLzwBuildingBlockuses LZW/2 and prefixes only the expanded length required by the generic raw-building-block contract;NuLzwCodecitself emits/consumes the native bytes used inside NuFX.Tests
Coverage includes CRC-16/XMODEM, canonical empty headers, partial/exact/multi-4K chunks, delimiter/run-heavy data, deterministic incompressible data, long persistent LZW/2 dictionaries across code-width changes, LZW/1 CRC corruption, trailing-pad tolerance, malformed Macintosh size hints, building-block roundtrip, and actual bitstream truncation rejection.
Behavior was cross-checked against Apple II File Type Note
$e0/8002, NuFX final-revision documentation, and current CiderPress II compatibility behavior. The NuFX.shk/.sdkcontainer remains separate in #128.