Go parallel zlib compression/decompression.
This is a fully zlib
compatible drop-in replacement for compress/zlib
.
This will split compression into blocks that are compressed in parallel.
This can be useful for compressing big amounts of data.
The output is a standard zlib
compressed data.
The zlib
decompression is modified so it decompresses ahead of the current reader.
This means that reads will be non-blocking if the decompressor can keep ahead of your code reading from it.
CRC calculation also takes place in a separate goroutine.
pzlib
is an adaptation of klauspost/pgzip for the zlib
usecase.
$> go get git.sr.ht/~sbinet/pzlib/...
To use as a replacement for zlib, exchange
import "compress/zlib"
with:
import zlib "git.sr.ht/~sbinet/pzlib"
This contains large portions of code from the Go repository - see GO_LICENSE for more information. The changes are released under MIT License. See LICENSE for more information.