Skip to content
Advertisement

Can PHP decompress a file compressed with the .NET GZipStream class?

I have a C# application that communicates with a PHP-based SOAP web service for updates and licensing.

I am now working on a feedback system for users to submit errors and tracelogs automatically through the software. Based on a previous question I posted, I felt that a web service would be the best way to do it (most likely to work properly with least configuration).

My current thought is to use .NET built-in gzip compression to compress the text file, convert to base64, send to the web-service, and have the PHP script convert to binary and uncompress the data.

Can PHP decompress data compressed with GZipStream, and if so, how?

Advertisement

Answer

I actually tried this. GZipStream doesn’t work. On the other hand, compressing with DeflateStream on .NET side and decompressing with gzinflate on PHP side do work. Your mileage may vary…

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement