Documentation ¶
Overview ¶
Package xz supports the compression and decompression of xz files. It supports version 1.0.4 of the specification without the non-LZMA2 filters. See http://tukaani.org/xz/xz-file-format-1.0.4.txt
Index ¶
Constants ¶
const ( CRC32 byte = 0x1 CRC64 = 0x4 SHA256 = 0xa )
Constants for the checksum methods supported by xz.
const HeaderLen = 12
HeaderLen provides the length of the xz file header.
Variables ¶
This section is empty.
Functions ¶
func ValidHeader ¶
ValidHeader checks whether data is a correct xz file header. The length of data must be HeaderLen.
Types ¶
type Reader ¶
type Reader struct { ReaderConfig // contains filtered or unexported fields }
Reader supports the reading of one or multiple xz streams.
type ReaderConfig ¶
ReaderConfig defines the parameters for the xz reader. The SingleStream parameter requests the reader to assume that the underlying stream contains only a single stream.
func (ReaderConfig) NewReader ¶
func (c ReaderConfig) NewReader(xz io.Reader) (r *Reader, err error)
NewReader creates an xz stream reader. The created reader will be able to process multiple streams and padding unless a SingleStream has been set in the reader configuration c.
func (*ReaderConfig) Verify ¶
func (c *ReaderConfig) Verify() error
Verify checks the reader parameters for Validity. Zero values will be replaced by default values.
type Writer ¶
type Writer struct { WriterConfig // contains filtered or unexported fields }
Writer compresses data written to it. It is an io.WriteCloser.
type WriterConfig ¶
type WriterConfig struct { Properties *lzma.Properties DictCap int BufSize int BlockSize int64 // checksum method: CRC32, CRC64 or SHA256 CheckSum byte // match algorithm Matcher lzma.MatchAlgorithm }
WriterConfig describe the parameters for an xz writer.
func (WriterConfig) NewWriter ¶
func (c WriterConfig) NewWriter(xz io.Writer) (w *Writer, err error)
NewWriter creates a new Writer using the given configuration parameters.
func (*WriterConfig) Verify ¶
func (c *WriterConfig) Verify() error
Verify checks the configuration for errors. Zero values will be replaced by default values.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
hash
Package hash provides rolling hashes.
|
Package hash provides rolling hashes. |
xlog
Package xlog provides a simple logging package that allows to disable certain message categories.
|
Package xlog provides a simple logging package that allows to disable certain message categories. |
Package lzma supports the decoding and encoding of LZMA streams.
|
Package lzma supports the decoding and encoding of LZMA streams. |