feat: phase 5 — Tight decoder with zlib streams and sub-palettes
codec/tight.rs: - Full Tight (encoding 7) decoder per ByteColorRFBRenderer.a() line 324 - Control byte: bottom 4 bits = zlib stream reset flags, top 4 bits = subencoding (0-15) - Subencoding 8: solid fill (1-byte color) - Subencoding 15: palette-indexed fill (selector + index) - Subencodings 4-7: filtered data with optional 2-color palette - Subencodings 10-13: reduced bit-depth packed (1/2/4 bpp) - Subencodings 0-3: raw 8bpp data - Data >= 12 bytes uses zlib compression with varint length - 4 persistent zlib streams with reset-on-flag logic - All 4 hardcoded sub-palettes ported as RGB332 indices: PALETTE_BW (2), PALETTE_GRAY4 (4), PALETTE_GRAY16 (16), PALETTE_COLOR16 (16 EGA-like colors) - Bit-depth unpackers: 1bpp, 2bpp, 4bpp (MSB-first) - 5 unit tests Updated examples to request [7, 5, 1, 0, -250] (Tight preferred). Tested against real OmniView: correct rendering with Tight encoding. 32 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -159,6 +159,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
||||
name = "ericrfb"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"png",
|
||||
"proptest",
|
||||
"thiserror",
|
||||
|
||||
Reference in New Issue
Block a user