Hi,
Can anybody tell me how to use the System.IO.Compr ession
Deflatestream Class.
I have a byte[] which is a compressed set of bytes that form a block.
I want to inflate the byte[] and return the new inflated byte[].
public static byte[] Deflate(byte[] c_block)
{
MemoryStream ms = new MemoryStream(c_ block);
DeflateStream zlib = new DeflateStream (ms,Compression Mode.Decompress );
zlib.Read(d_blo ck,0,??);
// Close the stream.
zlib.Close();
ms.Close();
return d_block;
}
Is this the right approach ?? If so, how can I tell the size of the inflated array d_block for the zlib.Read method. Can somebody provide some guidance.
Thanks
Phill
Can anybody tell me how to use the System.IO.Compr ession
Deflatestream Class.
I have a byte[] which is a compressed set of bytes that form a block.
I want to inflate the byte[] and return the new inflated byte[].
public static byte[] Deflate(byte[] c_block)
{
MemoryStream ms = new MemoryStream(c_ block);
DeflateStream zlib = new DeflateStream (ms,Compression Mode.Decompress );
zlib.Read(d_blo ck,0,??);
// Close the stream.
zlib.Close();
ms.Close();
return d_block;
}
Is this the right approach ?? If so, how can I tell the size of the inflated array d_block for the zlib.Read method. Can somebody provide some guidance.
Thanks
Phill
Comment