Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Hzip files store a length and checksum of the uncompressed data. The Reader will return an ErrChecksum when Read reaches the end of the uncompressed data if it does not have the expected length or checksum. Clients should treat data returned by Read as tentative until they receive the io.EOF marking the end of the data.
func NewReader ¶
NewReader creates a new Reader reading the given reader. If r does not also implement io.ByteReader, the decompressor may read more data than necessary from r.
It is the caller's responsibility to call Close on the Reader when done.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A Writer is an io.WriteCloser used to encode binary data into a gzipped, hex-encoded binary stream.
func NewWriter ¶
It is the caller's responsibility to call Close on the Writer when done. Writes may be buffered and not flushed until Close.
func (*Writer) Close ¶
Close closes the Writer by flushing any unwritten data to the underlying io.Writer and writing the hex-encoded, GZIP footer. It does not close the underlying io.Writer.
func (*Writer) Flush ¶
It is useful mainly in compressed network protocols, to ensure that a remote reader has enough data to reconstruct a packet. Flush does not return until the data has been written. If the underlying writer returns an error, Flush returns that error.
In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH.