Ionic Zip Library v1.9.1.6
Read Method (buffer, offset, count)
Reference ► Ionic.Zlib ► GZipStream ► Read(array<Byte>[]()[][], Int32, Int32)
Read and decompress data from the source stream.
Declaration Syntax
Return Value
the number of bytes actually read
Remarks
With a GZipStream, decompression is done through reading.
Examples
CopyC#
byte[] working = new byte[WORKING_BUFFER_SIZE]; using (System.IO.Stream input = System.IO.File.OpenRead(_CompressedFile)) { using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true)) { using (var output = System.IO.File.Create(_DecompressedFile)) { int n; while ((n= decompressor.Read(working, 0, working.Length)) !=0) { output.Write(working, 0, n); } } } }