Class GzipArchive

GzipArchive class

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

public class GzipArchive : IArchive, IArchiveFileEntry

Constructors

NameDescription
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

NameDescription
Name { get; }Name of original file.

Methods

NameDescription
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Extract(Stream)Extracts the archive to the stream provided.
Extract(string)Extracts the archive to the file by path.
ExtractToDirectory(string)Extracts content of the archive to the directory 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