zlib-comparison-text-1musk10 (v4)

Revision 4 of this benchmark created by ukyo on


Preparation HTML

<script src="https://raw.github.com/imaya/zlib-comparison/master/data/1musk10.txt.js"></script>

<script src="https://raw.github.com/imaya/zlib-comparison/master/zlib.js/inflate.min.js"></script>
<script src="https://raw.github.com/imaya/zlib-comparison/master/zlib.js/inflate_stream.min.js"></script>

<script src="https://raw.github.com/imaya/zlib-comparison/master/zlib-js/zlib.js"></script>
<script src="https://raw.github.com/imaya/zlib-comparison/master/zlib-js/zlib-inflate.js"></script>


<script src="https://raw.github.com/imaya/zlib-comparison/master/zpipe/zpipe.min.js"></script>

<script src="https://raw.github.com/imaya/zlib-comparison/master/pdf.js/stream.js"></script>

<script src="https://raw.github.com/imaya/zlib-comparison/master/jsziptools/dataview.min.js"></script>
<script src="https://raw.github.com/ukyo/jsziptools/master/build/jsziptools.min.js"></script>

<script>
var dataArray = toArray(data);

if (typeof Uint8Array === 'function') {
  dataArray = new Uint8Array(dataArray);
}

function toArray(str) {
  var i;
  var il;
  var array = new Array(str.length);

  for (i = 0, il = str.length; i < il; ++i) {
    array[i] = str.charCodeAt(i);
  }

  return array;
}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
zlib.js
new Zlib.Inflate(dataArray).decompress();

 
ready
zlib.js(stream)
new Zlib.InflateStream().decompress(dataArray);
ready
iz-zlib
ZLIB.inflateInit().inflate(data);
ready
pdf.js
new FlateStream(new Stream(dataArray)).getBytes();
ready
jsziptools
jz.zlib.decompress(dataArray);
ready
zpipe
zpipe.inflate(data);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 4: published by ukyo on