How to use the snappy.isValidCompressedSync function in snappy

To help you get started, we’ve selected a few snappy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kesla / snappy.js / test / benchmark / bench.js View on Github external
console.log('uncompress')
console.time('snappy')
for(var i = 0; i < 100; ++i)
  snappy.uncompressSync(input)
console.timeEnd('snappy')

console.time('snappy.js')
for(var i = 0; i < 100; ++i)
  snappyjs.uncompress(input)
console.timeEnd('snappy.js')

console.log('isValidCompressed')
console.time('snappy')
for(var i = 0; i < 100; ++i)
  snappy.isValidCompressedSync(input)
console.timeEnd('snappy')

console.time('snappy.js')
for(var i = 0; i < 100; ++i)
  snappyjs.isValidCompressed(input)
console.timeEnd('snappy.js')

snappy

Fastest Snappy compression library in Node.js

MIT
Latest version published 1 year ago

Package Health Score

66 / 100
Full package analysis