Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶ added in v0.45.0
type Compressor struct { Config // contains filtered or unexported fields }
func (*Compressor) Close ¶ added in v0.45.0
func (c *Compressor) Close() error
Close closes encoder and decoder, returns any error occurred.
func (*Compressor) Compress ¶ added in v0.45.0
func (c *Compressor) Compress(data []byte) []byte
Compress compresses data if compression is enabled and returns data untouched otherwise.
func (*Compressor) Decompress ¶ added in v0.45.0
func (c *Compressor) Decompress(data []byte) ([]byte, error)
Decompress decompresses data if it starts with the magic and returns data untouched otherwise.
func (*Compressor) Init ¶ added in v0.45.0
func (c *Compressor) Init() error
Init initializes compression routines.
func (*Compressor) NeedsCompression ¶ added in v0.46.0
func (c *Compressor) NeedsCompression(obj *objectSDK.Object) bool
NeedsCompression returns true if the object should be compressed. For an object to be compressed 2 conditions must hold: 1. Compression is enabled in settings. 2. Object MIME Content-Type is allowed for compression.
Click to show internal directories.
Click to hide internal directories.