Is it possible to decompress SharpZipLib compressed response via 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!
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.
精彩评论