Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.17.183.216
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : benchmark
#!/usr/bin/env node
var hpack = require('../');

var options = {
  table: { size: 1024 }
};

var compressor = hpack.compressor.create(options);

var vector = [];
for (var i = 0; i < 1024; i++) {
  vector.push({
    name: 'kind-of-big-header-name__',
    value: 'not-so-small value yes!',
    huffman: true,
    neverIndex: true
  });
}
compressor.write(vector);
var input = compressor.read();

console.time('decompressor');
for (var i = 0; i < 2000; i++) {
  var decompressor = hpack.decompressor.create(options);

  decompressor.write(input);
  decompressor.execute();
  while (true) {
    var chunk = decompressor.read();
    if (!chunk)
      break;
  }
}
console.timeEnd('decompressor');
© 2025 GrazzMean-Shell