Documentation ¶
Index ¶
- func BrotliCompress(input []byte, level int) ([]byte, error)
- func Bzip2Compress(input []byte) ([]byte, error)
- func FlateCompress(input []byte) ([]byte, error)
- func GzipCompress(input []byte) ([]byte, error)
- func MakeTar(t *testing.T, sink *Sink) []byte
- func MakeZip(t *testing.T, sink *Sink) []byte
- func NewTestSaveConsumer(threshold int64, onSave OnSaveFunc) savior.SaveConsumer
- func RunExtractorText(t *testing.T, makeExtractor MakeExtractorFunc, sink *Sink, ...)
- func RunSourceTest(t *testing.T, source savior.Source, reference []byte)
- type DoneItem
- type Item
- type MakeExtractorFunc
- type OnSaveFunc
- type ShouldSaveFunc
- type Sink
- func (cs *Sink) Close() error
- func (cs *Sink) GetWriter(entry *savior.Entry) (savior.EntryWriter, error)
- func (cs *Sink) Mkdir(entry *savior.Entry) error
- func (cs *Sink) Nuke() error
- func (cs *Sink) Preallocate(entry *savior.Entry) error
- func (cs *Sink) Reset()
- func (cs *Sink) Symlink(entry *savior.Entry, linkname string) error
- func (cs *Sink) Validate() error
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bzip2Compress ¶
func FlateCompress ¶
func GzipCompress ¶
func NewTestSaveConsumer ¶
func NewTestSaveConsumer(threshold int64, onSave OnSaveFunc) savior.SaveConsumer
func RunExtractorText ¶
func RunExtractorText(t *testing.T, makeExtractor MakeExtractorFunc, sink *Sink, shouldSave ShouldSaveFunc)
Types ¶
type MakeExtractorFunc ¶
type OnSaveFunc ¶
type OnSaveFunc func(checkpoint *savior.ExtractorCheckpoint) (savior.AfterSaveAction, error)
type ShouldSaveFunc ¶
type ShouldSaveFunc func() bool
type Sink ¶
Sink is a special kind of savior.Sink that records statistics about what's written to assist in unit testing.
func MakeTestSink ¶
func MakeTestSink() *Sink
func MakeTestSinkAdvanced ¶
Click to show internal directories.
Click to hide internal directories.