Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress data using a simplified version of the Lempel-Ziv-Welch (LZW) algorithm.
This algorithm differs from the one used by GIF, PDF, TIFF, etc. in that it does not place an upper limit on the number of codes. There is also no support for issuing reset codes. As this makes the amount of state needed to compress and decompress proportional to the size of the resulting compressed data, this algorithm is not suitable for compressing streams of data.
This algorithm provides a compression ratio that is worse than Zstandard. It is also slower. It is only provided because its output is deterministic and reproducible. Because it is easy to implement, it is easy to achieve reproducibility across implementations.
func Decompress ¶
Decompress data that was compressed using Compress() or MaybeCompress().
func MaybeCompress ¶
MaybeCompress compresses data, but discards the results if the compressed copy is larger than the original. In that case the uncompressed version is returned, prefixed with a decompressed size of 0 bytes, indicating that data is not compressed.
Types ¶
This section is empty.