Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultCompressionLevel = zstd.BestCompression
DefaultCompressionLevel used, where fastest = 1, best = 20, default = 5.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollyCache ¶
type CollyCache interface { Init() error Get(url string) ([]byte, error) Put(url string, data []byte) error Remove(url string) error }
CollyCache is the proposed interface for pluggable cache implementations in Colly.
type Compressor ¶
type Compressor struct { Level int Cache CollyCache Logging bool }
Compressor wraps a CollyCache to provide data compression using the Zstandard algorithm.
func NewCompressor ¶
func NewCompressor(cache CollyCache) *Compressor
NewCompressor creates wraps the given CollyCache with a Compressor, configured to use the default (maximum) compression level.
func (*Compressor) Init ¶
func (c *Compressor) Init() error
func (*Compressor) Remove ¶
func (c *Compressor) Remove(url string) error
Click to show internal directories.
Click to hide internal directories.