Documentation
¶
Overview ¶
Package gzipf provides a united interface around gzip and non-gzip files. The functions Open, Create, and Append take the file's suffix in consideration and use gzip streams if needed.
All I/O is buffered.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader reads data from a file. If the file has a .gz or .gzip suffix, it reads decompressed data.
func Open ¶
Open opens a file for reading. If the file has a .gz or .gzip suffix, its data is decompressed.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A Writer writes data to a file. If the file has a .gz or .gzip suffix, it compresses its data.
func Append ¶
Append opens a file for appending, keeping its existing content. If the file has a .gz or .gzip suffix, it writes compressed data.
func Create ¶
Create opens a file for writing, deleting any existing content. If the file has a .gz or .gzip suffix, it writes compressed data.