开发者

Is it possible to decompress SharpZipLib compressed response via PHP?

开发者 https://www.devze.com 2023-01-21 21:31 出处:网络
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

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!


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').


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消