Documentation ¶
Overview ¶
Package sz is an immature implementation of a Reader/Writer for the Snappy framing format. Use at your own risk; bug reports and test cases are welcome.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCRCMismatch = errors.New("sz: CRC mismatch")
View Source
var ErrFramingCorrupt = errors.New("sz: snappy framing corrupt")
View Source
var ErrStrictMemLimitExceeded = errors.New("sz: oversized block in strict-memory-usage mode")
View Source
var ErrUnexpectedChunk = errors.New("sz: unexpected chunk type")
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads content in the Snappy framing format.
func NewReaderStrictMem ¶
NewReaderStrictMem returns a Reader that rejects any chunk that's larger than a Snappy compressor would produce even for worst-case incompressible content. This is against the framing format spec (which permits 16MB chunks), but prevents a specially constructed stream from using a lot of memory, and may be useful when consuming untrusted content.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
sz
cmd/sz is a toy program for playing with github.com/twotwotwo/sz.
|
cmd/sz is a toy program for playing with github.com/twotwotwo/sz. |
Package snappy implements the snappy block-based compression format.
|
Package snappy implements the snappy block-based compression format. |
Click to show internal directories.
Click to hide internal directories.