Files
uc2/cli
Eremey Valetov e8f0ba5628 Integrate rANS into archive format as method 10 (levels 6-9)
rANS entropy coding is now a usable compression option:

  uc2 -w -L 8 archive.uc2 files...   # rANS Tight
  uc2 archive.uc2                     # decompresses (auto-detects method)

Block format for method 10:
  [block-present:1] [nsyms:16] [rans_len:16]
  [freq_table:344x12bits] [rans_data] [extra_bits]

Symbol IDs (0-343) encoded with rANS for near-optimal entropy.
Extra bits (distance/length parameters) stored separately in the
bitstream, preserving the existing variable-length encoding.

Integration:
- Compressor: flush_block_rans() dispatched when level >= 6
- Decompressor: decompressor_rans() dispatched for method 10
- CLI: levels 6-9 map to rANS Fast/Normal/Tight/Ultra
- COMPRESS records store method=10 for rANS files/cdir
- End-to-end round-trip verified (create/list/extract/verify)

Levels 2-5 (Huffman) remain the default for backward compatibility
with the original UC2 Pro.
2026-03-29 19:26:40 -04:00
..