Documentation
¶
Index ¶
- type Config
- func (c *Config) Close() error
- func (c *Config) Compress(data []byte) []byte
- func (c *Config) Decompress(data []byte) ([]byte, error)
- func (c *Config) DecompressForce(data []byte) ([]byte, error)
- func (c *Config) Init() error
- func (c *Config) IsCompressed(data []byte) bool
- func (c *Config) NeedsCompression(obj *objectSDK.Object) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool UncompressableContentTypes []string // contains filtered or unexported fields }
Config represents common compression-related configuration.
func (*Config) Compress ¶
Compress compresses data if compression is enabled and returns data untouched otherwise.
func (*Config) Decompress ¶
Decompress decompresses data if it starts with the magic and returns data untouched otherwise.
func (*Config) DecompressForce ¶ added in v0.41.0
DecompressForce decompresses given compressed data.
func (*Config) IsCompressed ¶ added in v0.41.0
IsCompressed checks whether given data is compressed.
func (*Config) NeedsCompression ¶
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.