package
0.7.1
Repository: https://github.com/hashicorp/go-extract.git
Documentation: pkg.go.dev

# Functions

Is7zip checks if the header matches the magic bytes for 7zip files.
IsBrotli returns always false, because the brotli magic bytes are not unique.
IsBzip2 checks if the header matches the magic bytes for bzip2 compressed files.
IsGZip checks if the header matches the magic bytes for gzip compressed files.
IsLZ4 checks if the header matches the LZ4 magic bytes.
IsSnappy checks if the header matches the snappy magic bytes.
IsTar checks if the header matches the magic bytes for tar files.
IsXz checks if the header matches the xz magic bytes.
IsZip checks if data is a zip archive.
IsZlib checks if the header matches the Zlib magic bytes.
IsZstd checks if the header matches the zstandard magic bytes.
No description provided by the author
NewLimitErrorReader returns a new LimitErrorReader that reads from r.
ReaderToReaderAtSeeker converts an io.Reader to an io.ReaderAt and io.Seeker.
Unpack7Zip sets a timeout for the ctx and starts the 7zip extraction from src to dst.
Unpack sets a timeout for the ctx and starts the brotli decompression from src to dst.
Unpack sets a timeout for the ctx and starts the bzip2 decompression from src to dst.
Unpack sets a timeout for the ctx and starts the gzip decompression from src to dst.
Unpack sets a timeout for the ctx and starts the lz4 decompression from src to dst.
Unpack sets a timeout for the ctx and starts the snappy decompression from src to dst.
Unpack sets a timeout for the ctx and starts the tar extraction from src to dst.
Unpack sets a timeout for the ctx and starts the xz decompression from src to dst.
Unpack sets a timeout for the ctx and starts the zip extraction from src to dst.
Unpack sets a timeout for the ctx and starts the zlib decompression from src to dst.
Unpack sets a timeout for the ctx and starts the zstandard decompression from src to dst.

# Constants

DEFAULT_NAME is the default name for the extracted content.
FileExtension7zip is the file extension for 7zip files.
FileExtensionBrotli is the file extension for brotli files.
FileExtensionBzip2 is the file extension for bzip2 files.
FileExtensionGZip is the file extension for gzip files.
FileExtensionLZ4 is the file extension for LZ4 files.
FileExtensionSnappy is the file extension for snappy files.
FileExtensionTar is the file extension for tar files.
FileExtensionTarGZip is the file extension for tgz files, which are tar archives compressed with gzip.
FileExtensionXz is the file extension for xz files.
FileExtensionZIP is the file extension for zip files.
FileExtensionZlib is the file extension for Zlib files.
FileExtensionZstd is the file extension for zstandard files.
SUFFIX is the suffix for the extracted content if the filename does not end with a file extension.

# Variables

AvailableExtractors is collection of new extractor functions with the required magic bytes and potential offset.
No description provided by the author

# Structs

No description provided by the author
HeaderReader is an implementation of io.Reader that allows the first bytes of the reader to be read twice.
LimitErrorReader is a reader that returns an error if the limit is exceeded before the underlying reader is fully read.
NoopReaderCloser is a struct that implements the io.ReaderCloser interface with a no-op Close method.

# Interfaces

SeekerReaderAt is a struct that combines the io.ReaderAt and io.Seeker interfaces.

# Type aliases

HeaderCheck is a function that checks if the given header matches the expected magic bytes.
UnpackFunc is a function that extracts the contents from src and extracts them to dst.