Show / Hide Table of Contents

Class GZip

An example class to demonstrate compression and decompression of GZip streams.

Inheritance
System.Object
GZip
Namespace: ICSharpCode.SharpZipLib.GZip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public static class GZip : object

Methods

| Improve this Doc View Source

Compress(Stream, Stream, Boolean, Int32, Int32)

Compress the inStream sending result data to outStream

Declaration
public static void Compress(Stream inStream, Stream outStream, bool isStreamOwner, int bufferSize = 512, int level = 6)
Parameters
Type Name Description
Stream inStream

The readable stream to compress.

Stream outStream

The output stream to receive the compressed data.

System.Boolean isStreamOwner

Both streams are closed on completion if true.

System.Int32 bufferSize

Deflate buffer size, minimum 512

System.Int32 level

Deflate compression level, 0-9

| Improve this Doc View Source

Decompress(Stream, Stream, Boolean)

Decompress the inStream writing uncompressed data to the outStream

Declaration
public static void Decompress(Stream inStream, Stream outStream, bool isStreamOwner)
Parameters
Type Name Description
Stream inStream

The readable stream containing data to decompress.

Stream outStream

The output stream to receive the decompressed data.

System.Boolean isStreamOwner

Both streams are closed on completion if true.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2019 SharpZipLib Contributors