3 ms·
You need to use a compression format that has sync points. For example, if you need to seek to 1GB in the uncompressed file, the compression itself needs to hav
by craigds 11y ago
You need to use a compression format that has sync points. For example, if you need to seek to 1GB in the uncompressed file, the compression itself needs to have recorded where that corresponds to in the compressed file.
zlib apparently supports the `Z_FULL_FLUSH` sync option which you can use at compression time to provide sync points. (I haven't used it, and it doesn't seem to be exposed by GNU gzip.) Other compression formats might have something similar.