import "github.com/byte-mug/fastnntp-backend2/decompress"
A decompression plugin system. This is used for the TRADGROUP code, because <CONFIG>/active and <CONFIG>/newsgroups have compressed counterparts, one in the ".bz2" format and one in ".gz", which should be supported.
Also, i prefer to use github.com/klauspost/compress for more speed.
func Register(ext string, deco Decoder, prio int)
-
type Decoder func(io.ReadCloser) (io.ReadCloser, error)
-
func Get(ext string) Decoder
Returns the matching Decoder or nil if not supported.
ext is the file extension like ".gz", ".bz2", or, if no compression is used, "".
import "io"
import "strings"
Path | Synopsis |
---|---|
gz/ | A bzip2 plugin for decomp. |
bz2/ | A bzip2 plugin for decomp. |