{"name":"lzo","version":"0.4.5","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","configure":"node-gyp configure","build":"node-gyp build","clean":"node-gyp clean","rebuild":"node-gyp rebuild","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","node-gyp":"^3.6.2"},"gitHead":"3d05d46c28ede4f9e71a1212c609644afb7478bc","bugs":{"url":"https://github.com/schroffl/node-lzo/issues"},"homepage":"https://github.com/schroffl/node-lzo#readme","_id":"lzo@0.4.5","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"schroffl","email":"hannes992@googlemail.com"},"dist":{"integrity":"sha512-AZsXEtCRX/4w+SyTg9cwN/j6ZlFeMy5mprnCeyHaeW93LW4u7WNwhdDeseSOAlcsnHNG37qatybzst6lO8P4EQ==","shasum":"1171d7d03ab9d0ef9ae09ce7f2fae35dc2cf4e51","tarball":"http://registry-npm.ywwl.com/lzo/download/lzo-0.4.5.tgz","fileCount":15,"unpackedSize":389445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwHxqCRA9TVsSAnZWagAAfAIP/jKMN6XcJnxj4DIEOW3k\n87Uv0ZGOCba5AW6ipXm9vhP4xM/O+g5acHYDhUdqqQoijl6vUzCwWs5d/omn\n7onLFPuj0PhL9EfPZPuXVH4Tzo48q5qX9RA8mp4Jy0eWWp2p+hDYeYUAI1+H\nIqh18SjuDTh0T0BLBDefMXEF6AAGGTDgvlHMqHpbR5sqci4qlBZBI38MyyY2\nfl5qHZ1m3n7GaNt84mb9tIjen2dQAiAbBBD0US+1UkmPULmWlfYSSIDxFbH4\nerHwt4mt7vuD/VSaEOfb2SDoVNi3rgXH5esjN3AUimxBRh7mKkKrpu5kBF2D\n0l9R8SR4AJZ83+IhriahXbKVlnwv16DZPNLO7vYRIftHXNm7YIy+zXSbaYG9\n1v+4pKnLMkWH7SW8jcRiP7zV4qvmz6DmNIUqOSGYkERE5XVxHqVpRUOTs6c0\n58WDrnGasqRcZQ4c03hR5ENTiwEl1h0SL3RiA3JyRZPxHKTmorZgX4tXn5zt\ngnUsITvruhMl7L8vzpEhwtE53FWHiF4cuGspr8lSqyWvjrD1BhDJzaz+oLrp\nIugjRC1T/5202ZSrHDo7IB8hOEzoSr6b8V5VTCK079YKbsAzRakYI+QIo0iW\nvjtCfSy8EXvM53oH8u7gyONPTKRaYunHP5y8dWpKLPzQPRhIkPNYXlQsr3YH\nAvK2\r\n=xJua\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNePJkh3zRmve0uc3girNb1K/o5T+eDbGLoguvWN1zBgIhAPLuAuBukhVxF2zsVfAbrx8Iy4NylqoPvVJ72G2Oup0A"}],"size":66264,"noattachment":false,"key":"/lzo/-/lzo-0.4.5.tgz"},"maintainers":[{"name":"schroffl","email":"hannes992@googlemail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lzo_0.4.5_1539341417712_0.1694086742725125"},"_hasShrinkwrap":false,"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":1539341417823,"_cnpm_publish_time":1539341417823,"dist-tags":{"latest":"0.4.11"}}