{"name":"lzo","version":"0.4.7","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":"^5.2.0","node-gyp":"^3.6.2"},"gitHead":"f9d3945eb15bd104bdbc95103bbcdea890f7d185","bugs":{"url":"https://github.com/schroffl/node-lzo/issues"},"homepage":"https://github.com/schroffl/node-lzo#readme","_id":"lzo@0.4.7","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"schroffl","email":"hannes992@googlemail.com"},"dist":{"integrity":"sha512-zDQza1eJaEzjL1IJ7/0/fK0GPxyog4wh8ZOD66fWYE/qQ9aWIy7JsYFDUKDxSnXRkAe6PnrPEWBQq7x7PqFn3A==","shasum":"aedcb82d66a50981d767d1b711a967b6d434a675","tarball":"http://registry-npm.ywwl.com/lzo/download/lzo-0.4.7.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\nwsFcBAEBCAAQBQJbwH7hCRA9TVsSAnZWagAAmg0P/1f3CLtmA9f57oLHLelK\nf7vBOUavHMzPbVJw8CsxHyQ4SBsQFZ4Qa6Rvu4oOm7af8i8oIwgs4Bfb8C+l\nTLWBa8T9dHpU4MC25wjp/PcrPtZ3LN4uBwT36kPt+r1x3MRPJACuv0ARQSd3\nfubmyp4uwy6pG5PGogxuAqhR72yCcPqMII5WFz0U/BYyhR2zeemfosR1swlc\nDRmSF2gte1bGWzxT1gl6gVWyyypOvH3YlHJWRPVcLR+DswM4UnHgBX5Jvvav\nKNpARZDW8sU9jvjJQ15SDPF2XTqDk/pHT5mFdSLLYSI95S8em7wwlEmKLguj\nYJFxwrV1ayPcd6G3j6DOOdrDufuI1VQPTHsSMGrrhGezobZ9o2XNosS7AROq\nWdBGWX8/AyXS/GY1NDrNMBrSPt6Qf5H5jEm7MTw7dgWIHx/zkpA7Iy9Vj4wZ\nTXl8p9l/ABp2Uj2bwlOX56aNiN3Qfm/AXtYWYJA8C+0OV5NRXL0vvps0fMY7\nqJchpb6WO7BmXpjFpMqFRpP6bGhnt7P3hGNOblLhVWGveMN6G3OeyCJFlbfD\nsCqHnkAMyc3O4etOrNhI6KPboVMTz/o5BsNu3q7M8GQhfv/oNUEDUEqEi98v\n/J9NOCNYMjvuuTgLRmaRLDFQXMSqG48Q9hFRis2uVU1c+vPnR95s5NRLXsZH\nnxF0\r\n=ozlW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpruDediZocDznqYivbaPVlXlsNc7mIRAdH27+BjRKOwIgKFyAiILaiI2hFsuD+DBTb/v4Le4aP3kyNsqaOCNSQjc="}],"size":66266,"noattachment":false,"key":"/lzo/-/lzo-0.4.7.tgz"},"maintainers":[{"name":"schroffl","email":"hannes992@googlemail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lzo_0.4.7_1539342048700_0.9603564945458027"},"_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":1539342048863,"_cnpm_publish_time":1539342048863,"dist-tags":{"latest":"0.4.11"}}