Documentation
¶
Overview ¶
Package zreader provides an io.ReadCloser for a variety of compression formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZReader ¶
type ZReader struct {
// contains filtered or unexported fields
}
ZReader is an io.ReadCloser that reads compressed files.
It currently supports bzip2, gzip, and zstd.
func NewReader ¶
NewReader returns a ZReader for the given io.ReadCloser. It selects a decompressor based on the first few bytes of data. If it does not have a decompressor to match the bytes, subsequent calls to [Read] will return the raw bytes of the reader. (That might, or might not, be what you want.)
func Open ¶
Open opens pathname and returns an appropriate ZReader. See NewReader for guidance on its behavior.
Click to show internal directories.
Click to hide internal directories.