Categorygithub.com/pchchv/compressor
modulepackage
0.0.9
Repository: https://github.com/pchchv/compressor.git
Documentation: pkg.go.dev

# README

compressor

Easy creation and extraction of archives, as well as compression and decompression of files of different formats

# Packages

No description provided by the author

# Functions

FilesFromDisk returns a list of files by traversing the directories in a given filename map.
FileSystem opens a file in the root as a read-only file system.
Identify goes through the registered formats and returns the one that matches the given file name and/or stream.
RegisterFormat registers the format.
TopDirOpen is a special Open() function, which can be useful if the file system root was created when the archive was extracted.
TopDirReadDir is like TopDirOpen but for ReadDir.
TopDirStat is like TopDirOpen but for Stat.

# Constants

Additional compression methods not offered by archive/zip.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

ArchiveFS allows accessing an archive (or a compressed archive) using a consistent file system interface.
Brotli facilitates brotli compression.
Bz2 facilitates bzip2 compression.
CompressedArchive combines a compression format on top of an archive format (e.g.
File abstraction for interacting with archives.
FileFS allows accessing a file on disk using a consistent file system interface.
FromDiskOptions specifies options for gathering files from the disk.
Gz facilitates gzip compression.
Lz4 facilitates LZ4 compression.
MatchResult returns true if the format was found either by name, by stream, or by both parameters.
No description provided by the author
No description provided by the author
Sz facilitates Snappy compression.
No description provided by the author
Xz facilitates xz compression.
No description provided by the author
Zlib facilitates zlib compression.
Zstd facilitates Zstandard compression.

# Interfaces

Archival is an archival format with both archive and extract methods.
Archiver can create a new archive.
ArchiverAsync is an Archiver that can also create archives asynchronously, pumping files into the channel as they are discovered.
Compression is a compression format with both compress and decompress methods.
Compressor can compress data by wrapping a writer.
Decompressor can decompress data by wrapping a reader.
Extractor can extract files from an archive.
The format is either an archive or a compression format.
Inserter can insert files into an existing archive.

# Type aliases

DirFS allows access to a directory on the disk with a serial file system interface.
FileHandler is a callback function that is used to handle files when reading them from an archive.