【问题标题】:Is it possible to decompress SharpZipLib compressed response via PHP?是否可以通过 PHP 解压缩 SharpZipLib 压缩响应?
【发布时间】:2010-10-26 18:31:26
【问题描述】:

环境:Linux / MySQL / PHP

问题:连接到 Web 服务时,我收到一个使用 SharpZipLib .NET 库压缩的响应。到目前为止,我还没有找到在 .NET 环境之外解压缩这些响应的方法。

有谁知道在 linux/php 环境中解压的方法吗?谢谢!

【问题讨论】:

标签: php web-services sharpziplib


【解决方案1】:

查看他们的 API 文档,我看到可以从 SharpZipLib 中使用 PHP 可以读取的以下压缩算法:BZip2Zip ('Deflated'),Zip.CompressionGZipTarLZW。其中一些甚至注册为stream filters,允许您以漂亮的方式链接它们,例如file_get_contents('compress.zlib://http://domain/resource')file_get_contents('compress.bzip2://php://stdin')

【讨论】:

    【解决方案2】:

    我最终使用了另一个提供非压缩响应的 Web 服务。然而,上面的信息很有用,只是不适用于这个特定的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-01
      相关资源
      最近更新 更多