是否可以通过 PHP 解压 SharpZipLib 压缩响应?

发布于 2024-09-29 00:34:01 字数 155 浏览 3 评论 0原文

环境:Linux / MySQL / PHP

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

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

Environment: Linux / MySQL / PHP

Problem: While connected to a webservice, I am getting a response that is compressed with the SharpZipLib .NET library. As of yet, I have not been able to find a way to decompress these responses outside of a .NET environment.

Does anyone know a way to decompress this in a linux/php environment? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

墨离汐 2024-10-06 00:34:01

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

Looking at their API documentation, I see the following compression algorithms that can be used from SharpZipLib which PHP can read: BZip2, Zip ('Deflated'), Zip.Compression, GZip, Tar, LZW. Some of these are even registered as stream filters, allowing you to chain them in nifty ways such as file_get_contents('compress.zlib://http://domain/resource') or file_get_contents('compress.bzip2://php://stdin').

埖埖迣鎅 2024-10-06 00:34:01

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

I ended up using another web service provided that provided a non-compressed response. However the information above was useful, just not for this specific problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文