GzipArchive

GzipArchive class

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

The GzipArchive type exposes the following members:

Constructors

NameDescription
GzipArchive()Initializes a new instance of the GzipArchive class prepared for compressing.
GzipArchive(source_stream, parse_header)Initializes a new instance of the GzipArchive class prepared for decompressing.
GzipArchive(source_stream, options)Initializes a new instance of the GzipArchive class prepared for decompressing.
GzipArchive(path, options)Initializes a new instance of the GzipArchive class prepared for decompressing.
GzipArchive(path, parse_header)Initializes a new instance of the GzipArchive class prepared for decompressing.

Properties

NameDescription
uncompressed_sizeGets size of an original file.
nameName of the original file.
file_entriesGets entries of IArchiveFileEntry type constituting the archive.
formatGets the archive format.
lengthGets the length of the entry in bytes.

Methods

NameDescription
set_source(source)Sets the content to be compressed within the archive.
set_source(path)Sets the content to be compressed within the archive.
set_source(tar_archive)Sets the content to be compressed within the archive.
extract(destination)Extracts the archive to the stream provided.
extract(path)Extracts content of the archive to the directory provided.
save(output_stream)Saves archive to the stream provided.
save(destination_file_name)Saves archive to the destination file provided.
open()Opens the archive for extraction and provides a stream with archive content.
extract_to_directory(destination_directory)Extracts content of the archive to the directory provided.

See Also