ZIP存档中Brotli压缩的ID号是多少?

时间:2016-06-20 18:55:21

标签: zip brotli

ZIP文件格式支持许多压缩算法并为它们分配数字,例如0表示存储,8表示deflate,14表示lzma。什么数字表示Brotli压缩?此压缩算法是否需要任何其他zip级元数据?

1 个答案:

答案 0 :(得分:1)

在撰写本文时,没有一个。 ZIP文件格式压缩方法的官方列表可在PKWare's ZIP Appnote中找到,其最新版本是日期为2014年10月1日的6.3.4。以下是其中定义的压缩方法:

   4.4.5 compression method: (2 bytes)

        0 - The file is stored (no compression)
        1 - The file is Shrunk
        2 - The file is Reduced with compression factor 1
        3 - The file is Reduced with compression factor 2
        4 - The file is Reduced with compression factor 3
        5 - The file is Reduced with compression factor 4
        6 - The file is Imploded
        7 - Reserved for Tokenizing compression algorithm
        8 - The file is Deflated
        9 - Enhanced Deflating using Deflate64(tm)
       10 - PKWARE Data Compression Library Imploding (old IBM TERSE)
       11 - Reserved by PKWARE
       12 - File is compressed using BZIP2 algorithm
       13 - Reserved by PKWARE
       14 - LZMA (EFS)
       15 - Reserved by PKWARE
       16 - Reserved by PKWARE
       17 - Reserved by PKWARE
       18 - File is compressed using IBM TERSE (new)
       19 - IBM LZ77 z Architecture (PFS)
       97 - WavPack compressed data
       98 - PPMd version I, Rev 1

我想你可以定义自己的方法编号并使用它,但这种用法是非标准的。 (这是一个双字节字段,所以你可以选择一个很大的数字,PKWare不太可能定义为其他东西。)

不,没有其他信息可以解压缩brotli流。