180 likes | 495 Views
Huffman Coding with Non-Sorted Frequencies. Shmuel Tomi Klein Dana Shapira Bar Ilan University, Ashkelon Academic College, ISRAEL. Background and motivation. Using non-sorted frequencies. Dynamic compression of data packets. Relevance to other compression. Conclusions. Outline.
E N D
Huffman Coding with Non-Sorted Frequencies Shmuel Tomi Klein Dana Shapira Bar Ilan University, Ashkelon Academic College, ISRAEL
Background and motivation Using non-sorted frequencies Dynamic compression of data packets Relevance to other compression Conclusions Outline Background and motivation Using non-sorted frequencies Dynamic compression of data packets Relevance to other compression Conclusions
Huffman’s algorithm Construction in Sorted frequencies Sufficient but not necessary Code construction only
Low text / code ratio Several codes Markov process encoding Dynamic coding schemes: Encoding based on Applications
7 5 3 3 2 2 22 7 5 4 3 3 13 9 7 6 5 4 7 6 5 4 9 7 6 13 9 3 3 2 2 22 Huffman Tree Optimal Trees
Optimal Trees 7 5 3 2 3 2 22 7 5 5 3 2 12 10 7 5 5 5 7 5 5 5 10 7 5 12 10 3 2 3 2 22 Non-Huffman Tree
Optimal Trees 7 5 3 3 2 2 22 7 5 4 3 3 12 10 7 5 6 4 7 5 6 4 10 7 5 12 10 3 3 2 2 22 Non-Huffman Tree
No restriction bad encoding 2n 1 32 1 16 2 8 4 4 8 2 16 1 1 2n
Restriction: order operations 7 5 3 3 2 2 7 9 6 7 5 3 3 4 13 9 7 5 6 4 22
Reversed order full tree Start with any order Then use 2 queues
W1 W2 W3 . . . WK Time: Partial Sort: parameter K
English 2-grams 7 3-grams 6 4-grams 5 4 3 2 8 32 128 512 2048 Average # bits/char vs # partition blocks 1-grams
1-grams 2-grams 3-grams 4-grams Average # bits/char vs # partition blocks French 7 6 5 4 3 2 8 32 128 512 2048
Encoding based on Dynamic compression of data packets
English French
Arithmetic coding 256-ary Huffman (s,c)-dense codes, Fibonacci codes Burrows-Wheeler Transform Relevance to other compression schemes
Not fully sorting the weights Time savings for sort intensive methods Conclusion Compresion / Time tradeoff