Documentation
¶
Overview ¶
Example ¶
data := []byte("zhang how, zhang how, zhang how, zhang how,") compressed := HuffmanCompress(data) fmt.Printf("performance %.4f\n", float64(len(compressed))/float64(len(data))) de, _ := HuffmanDecompress(compressed) fmt.Println(string(de))
Output: performance 0.7674 zhang how, zhang how, zhang how, zhang how,
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HuffmanCompress ¶
HuffmanCompress data using huffman algorithm
func HuffmanDecompress ¶
HuffmanDecompress data compressed by huffman algorithm
func LzwDecompress ¶
LzwDecompress data compressed by LZW algorithm
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.