Compression formats with good support for random access within archives?

前端 未结 13 2381
滥情空心
滥情空心 2020-11-27 11:45

This is similar to a previous question, but the answers there don\'t satisfy my needs and my question is slightly different:

I currently use gzip compression for som

13条回答
  •  暖寄归人
    2020-11-27 12:16

    Take a look at dictzip. It is compatible with gzip and allows coarse random access.

    An excerpt from its man page:

    dictzip compresses files using the gzip(1) algorithm (LZ77) in a manner which is completely compatible with the gzip file format. An extension to the gzip file format (Extra Field, described in 2.3.1.1 of RFC 1952) allows extra data to be stored in the header of a compressed file. Programs like gzip and zcat will ignore this extra data. However, [dictzcat --start] will make use of this data to perform pseudo-random access on the file.

    I have the package dictzip in Ubuntu. Or its source code is in a dictd-*.tar.gz. Its license is GPL. You are free to study it.

    Update:

    I improved dictzip to have no file size limit. My implementation is under MIT license.

提交回复
热议问题