You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vortex-onpair): store codes_offsets at adaptive u32/u64 width
Compression accepts u64 byte offsets (large-binary inputs), but the
codes_offsets child was always narrowed to u32, capping a chunk at 2^32
tokens and failing compression above it. Pick the narrowest of u32/u64
that holds the largest per-row code boundary instead, so codes_offsets
scales with the u64 byte-offset capacity. The cascading compressor still
narrows the common u32 case down to u16/u8, and the width round-trips via
the existing codes_offsets_ptype metadata, so the serialized format is
unchanged.
Widen CodesWindow to Buffer<u64> to match; the u64->usize conversions are
checked (cast_possible_truncation is denied) but fold away on 64-bit.
The u64 branch cannot be reached with realistic test data (>4 GiB chunk),
so cover it two ways: a unit test drives the width selection via a
threshold parameter, and a read-path test hand-widens a small array's
codes_offsets child and asserts canonical decode and the compressed-domain
equality compare (CodesWindow) behave identically to the u32 width.
Signed-off-by: Francesco Gargiulo <francesco@spiraldb.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments