Expand description
LZ4 block-stream compressor for browser-deployable dataset artifacts.
Unified v3 .q42 volumes already embed LZ4-compressed SuperBlocks; the
compress command copies them unchanged. Legacy v1 raw SuperBlock streams are
still converted to the framed transport format for the browser VFS:
Per block:
[block_id: u64 LE]
[comp_len: u32 LE]
[uncomp_len: u32 LE]
[payload: comp_len bytes] โ lz4_flex::compress_prepend_size outputStructsยง
Constantsยง
- CHUNK_
SIZE ๐ - Bytes per compressed chunk. 8 192 ร 48 = 393 216 โ the same size used by
the
importpipeline, so the browser decoder is identical for both sources. - QUINS_
PER_ ๐BLOCK - QUIN_
DATA_ ๐PER_ BLOCK - QUIN_
SIZE ๐ - SUPERBLOCK_
HEADER ๐ - SUPERBLOCK_
SIZE ๐ - SuperBlock layout constants (must match qualia-core-db).
Functionsยง
- compress_
q42 - Compress a
.q42file. Unified v3 volumes are copied as-is; legacy v1 SuperBlock streams are stripped and re-framed for the browser VFS. - compress_
raw - Compress any binary file (e.g. legacy
.lexsidecar) as raw bytes. - read_
exact_ ๐or_ eof - write_
lz4_ ๐block