illwieckz

compression comparison

Feb 2nd, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.80 KB | None | 0 0
  1. Brotli against Zip against 7z against XZ against Gzip
  2.  
  3. == samples ==
  4.  
  5. map-arachnid2_r1.2+55d0babe.pk3
  6. arena, DEPS, map, md, minimap: 1
  7. bsp: 1
  8. crn: 1
  9. jpg: 1
  10. navMesh: 11
  11. webp: 61
  12.  
  13. map-atcshd_r1.2+55d0babe.pk3
  14. arena, DEPS, map, md, minimap,
  15. particle, shader, txt: 9
  16. bsp: 1
  17. crn: 57
  18. jpg: 1
  19. navMesh: 11
  20. opus: 3
  21. webp: 254
  22.  
  23. map-karith_r1.2+55d0babe.pk3
  24. arena, DEPS, md, minimap, txt: 5
  25. bsp: 1
  26. crn: 1
  27. jpg: 1
  28. navMesh: 11
  29. webp: 151
  30.  
  31. map-nexus6_r1.2+55d0babe.pk3
  32. arena, DEPS, md, minimap, txt: 5
  33. bsp: 1
  34. crn: 1
  35. jpg: 1
  36. navMesh: 11
  37. webp: 65
  38.  
  39. map-niveus_r1.2+55d0babe.pk3
  40. arena, DEPS, md, minimap, txt: 5
  41. bsp: 1
  42. crn: 1
  43. jpg: 1
  44. navMesh: 11
  45. png: 1
  46. webp: 86
  47.  
  48. map-transit_r1.2+55d0babe.pk3
  49. arena, DEPS, md, minimap: 4
  50. bsp: 1
  51. crn: 1
  52. jpg: 1
  53. navMesh: 11
  54. webp: 57
  55.  
  56. map-tremor_r1.2+55d0babe.pk3
  57. arena, DEPS, md, minimap, shader, txt: 8
  58. bsp: 1
  59. crn: 1
  60. jpg: 1
  61. map: 2
  62. navMesh: 11
  63. webp: 34
  64.  
  65. map-uncreation_r1.2+55d0babe.pk3
  66. arena, DEPS, md, minimap, txt: 6
  67. bsp: 1
  68. crn: 1
  69. jpg: 1
  70. navMesh: 11
  71. webp: 25
  72.  
  73. res-tremulous_r1.2+55daaeaa.pk3
  74. ase, md, particle, shader, txt: 30
  75. crn: 591
  76. jpg: 13
  77. md3: 11
  78. opus: 24
  79. webp: 23
  80.  
  81. == pak ==
  82. tar: tar -cf $f *
  83. tar.gz: GZIP="-9" tar -czf $f *
  84. tar.xz: XZ_OPT="-9" tar -cJf $f *
  85. tar.bro: tar -cf - * | bro --quality 9 --output $f
  86. zip: 7z -mx=9 $f *
  87. 7z: 7z -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on $f *
  88.  
  89. == unpak ==
  90. tar: tar -O -xf $f > /dev/null
  91. tar.gz: tar -O -xzf $f > /dev/null
  92. tar.xz: tar -O -xJf $f > /dev/null
  93. tar.bro: bro --decompress --input $f | tar -O -xf - > /dev/null
  94. 7z: 7z -so x $f > /dev/null
  95. zip: 7z -so x $f > /dev/null
  96.  
  97. == file size (mb.kb.b) ==
  98. pak map-arachnid2 map-atcshd map-karith map-nexus6 map-niveus map-transit map-tremor map-uncreation res-tremulous
  99. tar 2.8866.560 13598.720 19.333.120 20.848.640 9.482.240 28.815.360 10.250.240 10.700.800 16.640.000
  100. tar.gz 6.702.381 8.869.598 6.305.414 6.694.699 3.677.325 9.779.694 3.475.460 3.490.951 15.281.166
  101. tar.xz 4.845.744 8.498.220 4.330.680 4.957.488 2.876.820 6.896.860 2.698.084 2.745.168 14.996.928
  102. tar.bro 5.907.222 8.659.369 5.435.202 6.005.831 3.187.348 7.841.343 3.132.558 3.150.140 14.945.640
  103. 7z 4.865.893 8.527.878 4.345.514 4.984.267 2.883.099 6.922.278 2.700.914 2.749.848 14.997.750
  104. zip 6.366.505 8.815.288 6.085.169 6.429.380 3.585.749 9.514.265 3.369.138 3.392.588 15.223.017
  105.  
  106. == pak time (s.ns) ==
  107. pak map-arachnid2 map-atcshd map-karith map-nexus6 map-niveus map-transit map-tremor map-uncreation res-tremulous
  108. tar 0.031108249 0.026598962 0.024750968 0.042911430 0.018348903 0.036427560 0.015782210 0.015540437 0.030912508
  109. tar.gz 4.619758333 1.206523163 4.136738827 4.525733361 1.810383202 4.019312268 1.520297583 2.499969792 0.789531315
  110. tar.xz 12.395273925 4.062947857 8.931828186 9.561809864 3.515980355 10.410907372 3.475477613 4.459663195 4.177392119
  111. tar.bro 3.441470781 1.143397108 3.395195947 3.006192510 1.284792667 3.699433756 1.247368364 1.301888256 1.835064158
  112. 7z 7.345675469 2.079608365 5.220763231 5.502779220 2.097778760 6.112834384 2.010613256 2.752270531 1.871396750
  113. zip 18.496632599 3.276296695 14.203500690 16.007108096 5.249327594 13.556391111 3.578733363 7.449519588 1.665836545
  114.  
  115. == unpak time (s.ns) ==
  116. pak map-arachnid2 map-atcshd map-karith map-nexus6 map-niveus map-transit map-tremor map-uncreation res-tremulous
  117. tar 0.011886851 0.007584412 0.016999453 0.018692582 0.006016185 0.026600756 0.007897573 0.006216247 0.009509641
  118. tar.gz 0.125611782 0.079102557 0.121825708 0.106941702 0.052309822 0.148776952 0.068804760 0.060589005 0.099674566
  119. tar.xz 0.322408798 0.296515900 0.317750291 0.320636670 0.161680713 0.387770340 0.131687201 0.160677269 0.782612101
  120. tar.bro 0.106900239 0.083265028 0.099653292 0.079989862 0.055635322 0.109937045 0.051881571 0.050235872 0.099883103
  121. 7z 0.349063723 0.493136729 0.302927608 0.341766520 0.184643229 0.471464378 0.188025729 0.204918225 0.825414875
  122. zip 0.164061669 0.105639060 0.136352083 0.140600340 0.071637991 0.194086546 0.075987107 0.069011761 0.142171434
  123.  
  124. == analysis ==
  125.  
  126. tar is here to compare with uncompressed file size
  127. bro is tested with tar to compress multiples files like a standard package
  128. bro compress slighty less than xz but more than zip and gzip
  129. bro compress faster than all other compression formats (but they were not in default mode)
  130. bro uncompress faster than all compression formats, in fact it just adds ~0.05ms to tar itself.
  131.  
  132. good: bro is very fast and compress well
  133. not good: tar.bro is not listable without decompression, we need a listable pak format like zip or 7z but with bro compression.
  134.  
  135. current pk3 format (zip) unpak in about 1/10s, we can wait for bro.
Add Comment
Please, Sign In to add comment