Documentation
¶
Overview ¶
Package compfile returns ReadClosers for files that are possibly compressed, guessing the compression type based on the file extension.
Index ¶
Constants ¶
View Source
const DefaultBufferSize = 65536
Variables ¶
View Source
var CompressionType = map[string]IoWrapper{
".bz2": bzipWrapper,
".bzip2": bzipWrapper,
".gz": gzipWrapper,
}
Functions ¶
func Open ¶
func Open(file string) (io.ReadCloser, error)
Open opens a file (possibly compressed) and returns a suitable buffered ReadCloser.
func OpenBufferedSize ¶
func OpenBufferedSize(file string, size int) (io.ReadCloser, error)
OpenBufferedSize opens a file for buffered I/O with the given buffer size.
Types ¶
type IoWrapper ¶
type IoWrapper func(io.ReadCloser) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.