【问题标题】:Zlib: What is the difference between inflating, encoding, and compressing a string? [duplicate]Zlib:膨胀、编码和压缩字符串有什么区别? [复制]
【发布时间】:2023-03-09 00:20:01
【问题描述】:

可能重复:
Which compression method to use in PHP?

看来PHP有很多functions for making smaller strings out of strings。这些函数称为膨胀/放气、编码/解码和压缩/解压缩。其中一些似乎相互兼容,因为它们都基于zlib 库。它们之间有什么区别,何时使用?

【问题讨论】:

    标签: php compression


    【解决方案1】:

    如链接中页面链接的功能文档所述:

    • gzdeflate - 使用带有 deflate 数据格式的“干净”DEFLATE 算法。

    • gzcompress - 使用ZLIB 数据格式,在 DEFLATE 算法中添加额外的标头和尾标数据。至于RFC 1950它“可以很容易地扩展使用 其他压缩方法”。

    • gzencode - 使用 gzip application 数据格式,该格式包含更多的 ZLIB 格式的标头数据。

    【讨论】:

      猜你喜欢
      • 2014-07-25
      • 2011-06-19
      • 2020-02-13
      • 2018-04-09
      • 1970-01-01
      • 1970-01-01
      • 2011-02-26
      • 2011-09-05
      • 1970-01-01
      相关资源
      最近更新 更多