Gap surfaced by a consumer (eigen-sheet #16, xlsx interop).
EigenScript has enough to write compressed-container formats: byte I/O
(write_bytes over a 0-255 list), bitwise ops (bit_xor/bit_and/bit_shr,
enough for a hand-rolled CRC32), and buffers. eigen-sheet now writes a real
.xlsx by assembling a stored (uncompressed) ZIP of OOXML parts — Excel and
LibreOffice open it.
But reading real-world .xlsx / .ods / .gz needs DEFLATE inflate —
Excel/LibreOffice always deflate their ZIP entries, and there is no
decompressor in the runtime. Hand-rolling inflate in pure EigenScript
(Huffman + LZ77 sliding window) is possible but heavy and slow, and it's a
fundamental primitive many consumers will want.
Proposed: a builtin inflate of bytes -> bytes (raw DEFLATE) and/or
zlib_inflate (zlib-wrapped), plus optionally deflate for compact writes.
A thin wrapper over the system zlib (already a common dependency) would do it;
keep it optional/extension-gated to preserve the zero-dependency minimal build.
Consumer impact: unblocks eigen-sheet #39 (xlsx/ods IMPORT). Also the natural
primitive for a gzip codec, any archive reader, HTTP gzip response bodies, etc.
Requested by the eigen-sheet Calc-parity work.
Gap surfaced by a consumer (eigen-sheet #16, xlsx interop).
EigenScript has enough to write compressed-container formats: byte I/O
(
write_bytesover a 0-255 list), bitwise ops (bit_xor/bit_and/bit_shr,enough for a hand-rolled CRC32), and buffers. eigen-sheet now writes a real
.xlsxby assembling a stored (uncompressed) ZIP of OOXML parts — Excel andLibreOffice open it.
But reading real-world
.xlsx/.ods/.gzneeds DEFLATE inflate —Excel/LibreOffice always deflate their ZIP entries, and there is no
decompressor in the runtime. Hand-rolling inflate in pure EigenScript
(Huffman + LZ77 sliding window) is possible but heavy and slow, and it's a
fundamental primitive many consumers will want.
Proposed: a builtin
inflate of bytes -> bytes(raw DEFLATE) and/orzlib_inflate(zlib-wrapped), plus optionallydeflatefor compact writes.A thin wrapper over the system zlib (already a common dependency) would do it;
keep it optional/extension-gated to preserve the zero-dependency minimal build.
Consumer impact: unblocks eigen-sheet #39 (xlsx/ods IMPORT). Also the natural
primitive for a gzip codec, any archive reader, HTTP gzip response bodies, etc.
Requested by the eigen-sheet Calc-parity work.