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
Add compressed size prefix to page headers for lz4 v4.1.23 compatibility
The lz4 library v4.1.23 added frame concatenation support, which peeks ahead
after reading a frame to check for another concatenated frame. This broke LTX
because each page is an independent LZ4 frame with a PageHeader in between.
This change adds a new PageHeaderFlagCompressedSize flag and writes a 4-byte
compressed size prefix after each page header. The decoder uses this size to
create an exact LimitedReader, preventing lz4 from peeking into the next page.
For backward compatibility, the decoder handles both formats:
- New format (flag set): reads compressed size, uses exact LimitedReader
- Old format (flag=0): uses LimitedReader workaround with lz4 frame footer size
Fixes#70
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments