logoalt Hacker News

nijaveyesterday at 9:23 PM3 repliesview on HN

Idk but btrfs and zfs manage to pull it off

Seekable OCI (SOCI) uses an index so I imagine that's an option (real byte range a-b maps to compressed range x-y). Presumably you'd still need to read the header and some additional pieces


Replies

mgerdtstoday at 1:19 AM

ZFS compresses recordsize or volblocksize chunks down to some whole number of disk blocks, as determined by 1 >> ashift. In practice, this typically means that each 128k chunk gets compressed to some number of sequential 512 or 4096 byte blocks. These compressed blocks are referenced by block pointers that contain flags indicating compression and what type.

butvacuumyesterday at 11:18 PM

afaik, ZFS will read an entire Record at a time- and that's the same granularity as its compression.

a_t48yesterday at 10:55 PM

It uses some form of keyframing. Not entirely free.