I'm trying to decompress a byte array. Because I want to extract a .png file from a zip.
I tried this:
var compressedData = ZlibStream.UncompressBuffer(cByteArray);
var uncompressedData = ZlibStream.CompressBuffer(compressedData);
using(FileStream fs = new FileStream(@"F:\picture.png", FileMode.Create)){
fs.Write(uncompressedData, 0, uncompressedData);
}
But got the following error: Bad state (unknown compression method (0x5C))
So can anyone help me out on how to get the file from the data. The compressed data is from a zip file entry. So the header is excluded.