Marlin :
loading : R:\tunstall_test\lzt24.literals filelen = 1111673 H = 7.452694 sym_count = 256 lzt24.literals : 1,111,673 -> 1,286,166 = 9.256 bpb = 0.864 to 1 decode_time2 : seconds:0.0022 ticks per: 3.467 b/kc : 288.41 MB/s : 498.66 loading : R:\tunstall_test\monarch.tga.rrz_filtered.bmp filelen = 1572918 H = 2.917293 sym_count = 236 monarch.tga.rrz_filtered.bmp: 1,572,918 -> 618,447 = 3.145 bpb = 2.543 to 1 decode_time2 : seconds:0.0012 ticks per: 1.281 b/kc : 780.92 MB/s : 1350.21 loading : R:\tunstall_test\paper1 filelen = 53161 H = 4.982983 sym_count = 95 paper1 : 53,161 -> 35,763 = 5.382 bpb = 1.486 to 1 decode_time2 : seconds:0.0001 ticks per: 1.988 b/kc : 503.06 MB/s : 869.78 loading : R:\tunstall_test\PIC filelen = 513216 H = 1.210176 sym_count = 159 PIC : 513,216 -> 140,391 = 2.188 bpb = 3.656 to 1 decode_time2 : seconds:0.0002 ticks per: 0.800 b/kc : 1250.71 MB/s : 2162.48 loading : R:\tunstall_test\tabdir.tab filelen = 190428 H = 2.284979 sym_count = 77 tabdir.tab : 190,428 -> 68,511 = 2.878 bpb = 2.780 to 1 decode_time2 : seconds:0.0001 ticks per: 1.031 b/kc : 969.81 MB/s : 1676.80 total bytes out : 1974785naive plural Tunstall :
loading : R:\tunstall_test\lzt24.literals filelen = 1111673 H = 7.452694 sym_count = 256 lzt24.literals : 1,111,673 -> 1,290,015 = 9.283 bpb = 0.862 to 1 decode_time2 : seconds:0.0022 ticks per: 3.443 b/kc : 290.45 MB/s : 502.18 loading : R:\tunstall_test\monarch.tga.rrz_filtered.bmp filelen = 1572918 H = 2.917293 sym_count = 236 monarch.tga.rrz_filtered.bmp: 1,572,918 -> 627,747 = 3.193 bpb = 2.506 to 1 decode_time2 : seconds:0.0012 ticks per: 1.284 b/kc : 779.08 MB/s : 1347.03 loading : R:\tunstall_test\paper1 filelen = 53161 H = 4.982983 sym_count = 95 paper1 : 53,161 -> 35,934 = 5.408 bpb = 1.479 to 1 decode_time2 : seconds:0.0001 ticks per: 1.998 b/kc : 500.61 MB/s : 865.56 loading : R:\tunstall_test\PIC filelen = 513216 H = 1.210176 sym_count = 159 PIC : 513,216 -> 145,980 = 2.276 bpb = 3.516 to 1 decode_time2 : seconds:0.0002 ticks per: 0.826 b/kc : 1211.09 MB/s : 2093.97 loading : R:\tunstall_test\tabdir.tab filelen = 190428 H = 2.284979 sym_count = 77 tabdir.tab : 190,428 -> 74,169 = 3.116 bpb = 2.567 to 1 decode_time2 : seconds:0.0001 ticks per: 1.103 b/kc : 906.80 MB/s : 1567.86 total bytes out : 1995503
About the files :
lzt24.literals are the literals left over after LZ-parsing (LZQ1) lzt24 like all LZ literals they are high entropy and thus do terribly in Tunstall monarch.tga.rrz_filtered.bmp is the image residual after filtering with my DPCM (it actually has a BMP header on it which is giving Tunstall a harder time than if I stripped the header) paper1 & pic are standard tabdir.tab is a text file of a dir listing with lots of tabs in itFor speed comparison, this is the Oodle Huffman on the same files :
loading file (0/5) : lzt24.literals ooHuffman1 : ed........................................................... ooHuffman1 : 1,111,673 -> 1,036,540 = 7.459 bpb = 1.072 to 1 encode : 8.405 millis, 13.07 c/b, rate= 132.26 mb/s decode : 1.721 millis, 2.68 c/b, rate= 645.81 mb/s ooHuffman1,1036540,8405444,1721363 loading file (1/5) : monarch.tga.rrz_filtered.bmp ooHuffman1 : ed........................................................... ooHuffman1 : 1,572,918 -> 586,839 = 2.985 bpb = 2.680 to 1 encode : 7.570 millis, 8.32 c/b, rate= 207.80 mb/s decode : 2.348 millis, 2.58 c/b, rate= 669.94 mb/s ooHuffman1,586839,7569562,2347859 loading file (2/5) : paper1 ooHuffman1 : 53,161 -> 33,427 = 5.030 bpb = 1.590 to 1 encode : 0.268 millis, 8.70 c/b, rate= 198.67 mb/s decode : 0.080 millis, 2.60 c/b, rate= 665.07 mb/s ooHuffman1,33427,267579,79933 loading file (3/5) : PIC ooHuffman1 : 513,216 -> 106,994 = 1.668 bpb = 4.797 to 1 encode : 2.405 millis, 8.10 c/b, rate= 213.41 mb/s decode : 0.758 millis, 2.55 c/b, rate= 677.32 mb/s ooHuffman1,106994,2404854,757712 loading file (4/5) : tabdir.tab ooHuffman1 : 190,428 -> 58,307 = 2.450 bpb = 3.266 to 1 encode : 0.926 millis, 8.41 c/b, rate= 205.70 mb/s decode : 0.279 millis, 2.54 c/b, rate= 681.45 mb/s ooHuffman1,58307,925742,279447
Tunstall is crazy fast. And of course that's a rather basic implementation of the decoder, I'm sure it could get faster.
Is there an application for plural Tunstall? I'm not sure. I tried it back in 2015 as an idea for literals in Mermaid/Selkie and abandoned it as not very relevant there. It works on low-entropy order-0 data (like image prediction residuals).
Of course if you wanted to test it against the state of the art you should consider SIMD Ryg RANS or GPU RANS. You should consider something like TANS with multiple symbols in the output table. You should consider merged-symbol codes, perhaps using escapes, perhaps runlen transforms. See for example "crblib/huffa.c" for a survey of Huffman ideas from 1996 (pre-runtransform, blocking MPS's, order-1-huff, multisymbol output, etc.)
No comments:
Post a Comment