Documentation ¶
Index ¶
- type DeflateStreamShrinker
- func (b *DeflateStreamShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *DeflateStreamShrinker) Decompressor() []jen.Code
- func (b *DeflateStreamShrinker) Header() []jen.Code
- func (b *DeflateStreamShrinker) IsReaderWithError() bool
- func (b *DeflateStreamShrinker) IsStream() bool
- func (b *DeflateStreamShrinker) Name() string
- func (b *DeflateStreamShrinker) Reader(params ...jen.Code) jen.Code
- func (b *DeflateStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type GzipStreamShrinker
- func (b *GzipStreamShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *GzipStreamShrinker) Decompressor() []jen.Code
- func (b *GzipStreamShrinker) Header() []jen.Code
- func (b *GzipStreamShrinker) IsReaderWithError() bool
- func (b *GzipStreamShrinker) IsStream() bool
- func (b *GzipStreamShrinker) Name() string
- func (b *GzipStreamShrinker) Reader(params ...jen.Code) jen.Code
- func (b *GzipStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type LzwStreamShrinker
- func (b *LzwStreamShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *LzwStreamShrinker) Decompressor() []jen.Code
- func (b *LzwStreamShrinker) Header() []jen.Code
- func (b *LzwStreamShrinker) IsReaderWithError() bool
- func (b *LzwStreamShrinker) IsStream() bool
- func (b *LzwStreamShrinker) Name() string
- func (b *LzwStreamShrinker) Reader(params ...jen.Code) jen.Code
- func (b *LzwStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type NoShrinker
- func (b *NoShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *NoShrinker) Decompressor() []jen.Code
- func (b *NoShrinker) Header() []jen.Code
- func (b *NoShrinker) IsReaderWithError() bool
- func (b *NoShrinker) IsStream() bool
- func (b *NoShrinker) Name() string
- func (b *NoShrinker) Reader(params ...jen.Code) jen.Code
- func (b *NoShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type Shrinker
- type SnappyShrinker
- func (b *SnappyShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *SnappyShrinker) Decompressor() []jen.Code
- func (b *SnappyShrinker) Header() []jen.Code
- func (b *SnappyShrinker) IsReaderWithError() bool
- func (b *SnappyShrinker) IsStream() bool
- func (b *SnappyShrinker) Name() string
- func (b *SnappyShrinker) Reader(params ...jen.Code) jen.Code
- func (b *SnappyShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type SnappyStreamShrinker
- func (b *SnappyStreamShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *SnappyStreamShrinker) Decompressor() []jen.Code
- func (b *SnappyStreamShrinker) Header() []jen.Code
- func (b *SnappyStreamShrinker) IsReaderWithError() bool
- func (b *SnappyStreamShrinker) IsStream() bool
- func (b *SnappyStreamShrinker) Name() string
- func (b *SnappyStreamShrinker) Reader(params ...jen.Code) jen.Code
- func (b *SnappyStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
- type ZlibStreamShrinker
- func (b *ZlibStreamShrinker) Compress(file goembed.File) ([]jen.Code, error)
- func (b *ZlibStreamShrinker) Decompressor() []jen.Code
- func (b *ZlibStreamShrinker) Header() []jen.Code
- func (b *ZlibStreamShrinker) IsReaderWithError() bool
- func (b *ZlibStreamShrinker) IsStream() bool
- func (b *ZlibStreamShrinker) Name() string
- func (b *ZlibStreamShrinker) Reader(params ...jen.Code) jen.Code
- func (b *ZlibStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeflateStreamShrinker ¶
type DeflateStreamShrinker struct { }
DeflateStreamShrinker is a Shrinker compatible struct that uses deflate compression.
func (*DeflateStreamShrinker) Decompressor ¶
func (b *DeflateStreamShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*DeflateStreamShrinker) Header ¶
func (b *DeflateStreamShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*DeflateStreamShrinker) IsReaderWithError ¶
func (b *DeflateStreamShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*DeflateStreamShrinker) IsStream ¶
func (b *DeflateStreamShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*DeflateStreamShrinker) Name ¶
func (b *DeflateStreamShrinker) Name() string
Name returns a simple name for this module.
func (*DeflateStreamShrinker) Reader ¶
func (b *DeflateStreamShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*DeflateStreamShrinker) ReaderWithError ¶
func (b *DeflateStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.
type GzipStreamShrinker ¶
type GzipStreamShrinker struct { }
GzipStreamShrinker is a Shrinker compatible struct that uses gzip compression.
func (*GzipStreamShrinker) Decompressor ¶
func (b *GzipStreamShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*GzipStreamShrinker) Header ¶
func (b *GzipStreamShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*GzipStreamShrinker) IsReaderWithError ¶
func (b *GzipStreamShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*GzipStreamShrinker) IsStream ¶
func (b *GzipStreamShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*GzipStreamShrinker) Name ¶
func (b *GzipStreamShrinker) Name() string
Name returns a simple name for this module.
func (*GzipStreamShrinker) Reader ¶
func (b *GzipStreamShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*GzipStreamShrinker) ReaderWithError ¶
func (b *GzipStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()`.
type LzwStreamShrinker ¶
type LzwStreamShrinker struct { }
LzwStreamShrinker is a Shrinker compatible struct that uses lzw compression.
func (*LzwStreamShrinker) Decompressor ¶
func (b *LzwStreamShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*LzwStreamShrinker) Header ¶
func (b *LzwStreamShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*LzwStreamShrinker) IsReaderWithError ¶
func (b *LzwStreamShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*LzwStreamShrinker) IsStream ¶
func (b *LzwStreamShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*LzwStreamShrinker) Name ¶
func (b *LzwStreamShrinker) Name() string
Name returns a simple name for this module.
func (*LzwStreamShrinker) Reader ¶
func (b *LzwStreamShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*LzwStreamShrinker) ReaderWithError ¶
func (b *LzwStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.
type NoShrinker ¶
type NoShrinker struct { }
NoShrinker is a Shrinker compatible struct that uses no compression.
func (*NoShrinker) Decompressor ¶
func (b *NoShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*NoShrinker) Header ¶
func (b *NoShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*NoShrinker) IsReaderWithError ¶
func (b *NoShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*NoShrinker) IsStream ¶
func (b *NoShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*NoShrinker) Name ¶
func (b *NoShrinker) Name() string
Name returns a simple name for this module.
func (*NoShrinker) Reader ¶
func (b *NoShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*NoShrinker) ReaderWithError ¶
func (b *NoShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.
type Shrinker ¶
type Shrinker interface { Name() string Compress(file goembed.File) ([]jen.Code, error) Header() []jen.Code Decompressor() []jen.Code IsStream() bool IsReaderWithError() bool Reader(params ...jen.Code) jen.Code ReaderWithError(params ...jen.Code) jen.Code }
Shrinker is the interface that provides a compression method for the data.
func NewDeflateStreamShrinker ¶
func NewDeflateStreamShrinker() Shrinker
NewDeflateStreamShrinker returns a Shrinker compatible class that uses deflate compression.
func NewGzipStreamShrinker ¶
func NewGzipStreamShrinker() Shrinker
NewGzipStreamShrinker returns a Shrinker compatible class that uses gzip compression.
func NewLzwStreamShrinker ¶
func NewLzwStreamShrinker() Shrinker
NewLzwStreamShrinker returns a Shrinker compatible class that uses lzw compression.
func NewNoShrinker ¶
func NewNoShrinker() Shrinker
NewNoShrinker returns a Shrinker compatible class that uses no compression.
func NewSnappyShrinker ¶
func NewSnappyShrinker() Shrinker
NewSnappyShrinker returns a Shrinker compatible class that uses snappy compression.
func NewSnappyStreamShrinker ¶
func NewSnappyStreamShrinker() Shrinker
NewSnappyStreamShrinker returns a Shrinker compatible class that uses snappy compression.
func NewZlibStreamShrinker ¶
func NewZlibStreamShrinker() Shrinker
NewZlibStreamShrinker returns a Shrinker compatible class that uses zlib compression.
type SnappyShrinker ¶
type SnappyShrinker struct { }
SnappyShrinker is a Shrinker compatible struct that uses snappy compression.
func (*SnappyShrinker) Decompressor ¶
func (b *SnappyShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*SnappyShrinker) Header ¶
func (b *SnappyShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*SnappyShrinker) IsReaderWithError ¶
func (b *SnappyShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*SnappyShrinker) IsStream ¶
func (b *SnappyShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*SnappyShrinker) Name ¶
func (b *SnappyShrinker) Name() string
Name returns a simple name for this module.
func (*SnappyShrinker) Reader ¶
func (b *SnappyShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*SnappyShrinker) ReaderWithError ¶
func (b *SnappyShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.
type SnappyStreamShrinker ¶
type SnappyStreamShrinker struct { }
SnappyStreamShrinker is a Shrinker compatible struct that uses snappy compression.
func (*SnappyStreamShrinker) Decompressor ¶
func (b *SnappyStreamShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*SnappyStreamShrinker) Header ¶
func (b *SnappyStreamShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*SnappyStreamShrinker) IsReaderWithError ¶
func (b *SnappyStreamShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*SnappyStreamShrinker) IsStream ¶
func (b *SnappyStreamShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*SnappyStreamShrinker) Name ¶
func (b *SnappyStreamShrinker) Name() string
Name returns a simple name for this module.
func (*SnappyStreamShrinker) Reader ¶
func (b *SnappyStreamShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*SnappyStreamShrinker) ReaderWithError ¶
func (b *SnappyStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.
type ZlibStreamShrinker ¶
type ZlibStreamShrinker struct { }
ZlibStreamShrinker is a Shrinker compatible struct that uses zlib compression.
func (*ZlibStreamShrinker) Decompressor ¶
func (b *ZlibStreamShrinker) Decompressor() []jen.Code
Decompressor returns the body code for the `decode(input)` function.
func (*ZlibStreamShrinker) Header ¶
func (b *ZlibStreamShrinker) Header() []jen.Code
Header returns additional code that is inserted in the body.
func (*ZlibStreamShrinker) IsReaderWithError ¶
func (b *ZlibStreamShrinker) IsReaderWithError() bool
IsReaderWithError returns true if the shrinker uses a reader that also can error.
func (*ZlibStreamShrinker) IsStream ¶
func (b *ZlibStreamShrinker) IsStream() bool
IsStream returns true if the shrinker works on streams instead of byte slices.
func (*ZlibStreamShrinker) Name ¶
func (b *ZlibStreamShrinker) Name() string
Name returns a simple name for this module.
func (*ZlibStreamShrinker) Reader ¶
func (b *ZlibStreamShrinker) Reader(params ...jen.Code) jen.Code
Reader returns the stream handler for the byte stream used when returning `Open()`.
func (*ZlibStreamShrinker) ReaderWithError ¶
func (b *ZlibStreamShrinker) ReaderWithError(params ...jen.Code) jen.Code
ReaderWithError returns the stream handler for the byte stream used when returning `Open()` but also returns an error.