GzipArchive

GzipArchive class

This class represents gzip archive file. Use it to compose or extract gzip archives.

public class GzipArchive : IDisposable

Constructors

Name Description
GzipArchive() Initializes a new instance of the GzipArchive class prepared for compressing.
GzipArchive(Stream, bool) Initializes a new instance of the GzipArchive class prepared for decompressing.
GzipArchive(string, bool) Initializes a new instance of the GzipArchive class.

Properties

Name Description
Name { get; } Name of original file.

Methods

Name Description
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Extract(Stream) Extracts the archive to the stream provided.
Open() Opens the archive for extraction and provides a stream with archive content.
Save(Stream) Saves archive to the stream provided.
Save(string) Saves archive to destination file provided.
SetSource(FileInfo) Sets the content to be compressed within the archive.
SetSource(Stream) Sets the content to be compressed within the archive.
SetSource(string) Sets the content to be compressed within the archive.
SetSource(TarArchive) Sets the content to be compressed within the archive.

Remarks

Gzip compression algorithm is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding.

See Also