{"name":"lzo","version":"0.4.0","description":"node.js bindings for lzo compression","main":"index.js","repository":{"type":"git","url":"git+https://github.com/schroffl/node-lzo.git"},"scripts":{"test":"mocha test","install":"node-gyp rebuild"},"author":{"name":"schroffl"},"license":"MIT","gypfile":true,"dependencies":{"bindings":"~1.2.1"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5"},"gitHead":"606d5182e0e8eb02d1abb9e90bf6c903c2530c1c","bugs":{"url":"https://github.com/schroffl/node-lzo/issues"},"homepage":"https://github.com/schroffl/node-lzo#readme","_id":"lzo@0.4.0","_shasum":"25a5b9a9459594f4c4cb8979688c7476d5fef9fc","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.1","_npmUser":{"name":"schroffl","email":"hannes992@googlemail.com"},"dist":{"shasum":"25a5b9a9459594f4c4cb8979688c7476d5fef9fc","tarball":"http://registry-npm.ywwl.com/lzo/download/lzo-0.4.0.tgz","integrity":"sha512-ylfa2eDT7v1B5wiL4bQyT+kRYovDn9+FErRRAQ3N4VSf1pKphS8xFzJbBry5tu1he9h8J1WalPQ9pCEBHvVrDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnySk+XN5rBfhs2LHa6LKyNBr3uL1mDY3n9c/M9OI9ZAiB1FpiZm/kJ9dUa3toow85pPDIofpQ+uwSzuIrCwSq/sQ=="}],"size":66088,"noattachment":false,"key":"/lzo/-/lzo-0.4.0.tgz"},"maintainers":[{"name":"schroffl","email":"hannes992@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/lzo-0.4.0.tgz_1483472293052_0.003923670155927539"},"deprecated":"Critical fix in 0.4.1; See https://github.com/schroffl/node-lzo/issues/6","directories":{},"readme":"# node-lzo [![npm version](https://badge.fury.io/js/lzo.svg)](https://badge.fury.io/js/lzo)\nNode.js Bindings for [LZO Compression](http://www.oberhumer.com/opensource/lzo/)\n\n## Example\n```javascript\nconst lzo = require('lzo');\n\nconsole.log('Current version:', lzo.version, '-', lzo.versionDate);\n\nlet str = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam',\n    compressed = lzo.compress(str);\n\nconsole.log('Original Length:', str.length, '-- Compressed length:', compressed.length);\n\nlet decompressed = lzo.decompress(compressed);\n\nconsole.log('Decompressed Length:', decompressed.length);\nconsole.log(decompressed.toString());\n```\n\n## Properties\n#### version\nThe version of [LZO](http://www.oberhumer.com/opensource/lzo/) being used.\n\n#### versionDate\nThe date on which the version was released.\n\n#### errors\nAn object containing the lzo error codes as seen below.\n\n\n## Methods\n#### compress(data, *length*)\nIf *data* is not a Buffer, the function will try to convert it via `Buffer.from`.\nIf you specify a *length*, the function will allocate that much memory for the compressed data.  \nReturns the compressed data as a Buffer.\n\n#### decompress(data, *length*)\nIf *data* is not a Buffer, the function will try to convert it via `Buffer.from`.\nIf you specify a *length*, the function will allocate that much memory for the decompressed data. I suggest you to do so whenever you know the length.  \nReturns the decompressed data as a Buffer.\n\n## Errors\nCode | Description\n-------------: | :------------- \n`-1` | LZO\\_E\\_ERROR\n`-2` | LZO\\_E\\_OUT\\_OF\\_MEMORY\n`-3` | LZO\\_E\\_NOT\\_COMPRESSIBLE\n`-4` | LZO\\_E\\_INPUT\\_OVERRUN\n`-5` | LZO\\_E\\_OUTPUT\\_OVERRUN\n`-6` | LZO\\_E\\_LOOKBEHIND_OVERRUN\n`-7` | LZO\\_E\\_EOF\\_NOT\\_FOUND\n`-8` | LZO\\_E\\_INPUT\\_NOT\\_CONSUMED\n`-9` | LZO\\_E\\_NOT\\_YET\\_IMPLEMENTED\n`-10` | LZO\\_E\\_INVALID\\_ARGUMENT\n`-11` | LZO\\_E\\_INVALID\\_ALIGNMENT\n`-12` | LZO\\_E\\_OUTPUT\\_NOT\\_CONSUMED\n`-99` | LZO\\_E\\_INTERNAL\\_ERROR\n","publish_time":1483472293773,"_cnpm_publish_time":1483472293773,"dist-tags":{"latest":"0.4.11"}}