首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在ZIP存档中Brotli压缩的id号是多少?

在ZIP存档中Brotli压缩的id号是多少?
EN

Stack Overflow用户
提问于 2016-06-20 18:55:21
回答 1查看 334关注 0票数 2

ZIP文件格式支持许多压缩算法,并为它们分配编号,例如0是存储,8是压缩,14是lzma。哪个数字表示Brotli压缩?这种压缩算法是否需要额外的压缩级元数据?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-19 05:03:10

在写这篇文章的时候,没有一篇。ZIP文件格式压缩方法的官方列表在PKWare的ZIP附录中找到,最新版本为6.3.4,日期为2014年10月1日。以下是其中定义的压缩方法:

代码语言:javascript
复制
   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流。

更新:

截至2020年7月附录(6.3.9),更多的压缩方法,特别是zstd和xz,但仍然没有brotli。

代码语言:javascript
复制
   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
       15 - Reserved by PKWARE
       16 - IBM z/OS CMPSC Compression
       17 - Reserved by PKWARE
       18 - File is compressed using IBM TERSE (new)
       19 - IBM LZ77 z Architecture 
       20 - deprecated (use method 93 for zstd)
       93 - Zstandard (zstd) Compression 
       94 - MP3 Compression 
       95 - XZ Compression 
       96 - JPEG variant
       97 - WavPack compressed data
       98 - PPMd version I, Rev 1
       99 - AE-x encryption marker (see APPENDIX E)
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37929829

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档