{"name":"compress-buffer","description":"Single-step Buffer compression library for Node.js","homepage":"http://egorfine.github.com/node-compress-buffer","bugs":{"url":"http://github.com/egorFiNE/node-compress-buffer/issues"},"version":"0.5.1","author":{"name":"Egor Egorov"},"repository":{"type":"git","url":"git://github.com/egorfine/node-compress-buffer.git"},"engine":["node >=0.4.0"],"main":"./index","scripts":{"install":"make build"},"devDependencies":{"nodeunit":">=0.5.4"},"_npmUser":{"name":"egorfine","email":"me@egorfine.com"},"_id":"compress-buffer@0.5.1","dependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"bf516511b119cb1d0bc51434de698ed1559e85ef","tarball":"http://registry-npm.ywwl.com/compress-buffer/download/compress-buffer-0.5.1.tgz","integrity":"sha512-+mARw7+RpjfZ8eb/PmPY80fzEV9QwslwWdmHF+0zGqOsPS+wEqYcZA4xDvf/ABuEldoyj3blX3MxAH1PyY8tIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3PplTkeCRjMZHfxgniOEJP8lNN+T29PGPL86RFuz91AIhAL1POOhU1J9z8L6+ZSK9sB2Vtn8vLqFpG/a9KJ3P0+bd"}],"size":51200,"noattachment":false,"key":"/compress-buffer/-/compress-buffer-0.5.1.tgz"},"maintainers":[{"name":"egorfine","email":"me@egorfine.com"}],"directories":{},"deprecated":"this has been created when no compression library existed for Node.js. This isn't the case for years","readme":"# node-compress-buffer \n\nSynchronous zlib Buffer compression library for Node.js.\n\n\n## Synopsis\n\n```javascript\ncompress = require('compress-buffer').compress;\nuncompress = require('compress-buffer').uncompress;\n\nvar rawData = fs.readFileSync(\"/etc/passwd\");\n\nvar compressed   = compress(rawData);\nvar uncompressed = uncompress(compressed);\n\nuncompressed == rawData // true!\n```\n\n\n## Why? \n\nFor the sake of the KISS principle. Most of the time you don't need a streaming compression, you need to compress an existing and already complete data. \n\n\n## Options \n\n<code>compress()</code> takes two arguments: the data (must be a <code>Buffer()</code>) and optional compression level which must be within 1..9. It returns compressed <code>Buffer()</code> or <code>undefined</code> on error.\n\n<code>uncompress()</code> takes a single argument: the data (must be a <code>Buffer()</code>) and returns uncompressed <code>Buffer()</code> or <code>undefined</code> on error.\n\nBoth functions could throw exceptions in the following cases:\n\n* zlib initialisation fails;\n* first argument is not a <code>Buffer</code> instance.\n\n\n## Installation\n\n\tnpm install compress-buffer\n\nor\n\n\tnpm install .\n\n\n## License\n\nSee LICENSE file. Basically, it's a kind of \"do-whatever-you-want-for-free\" license.\n\n\n## Thanks to \n\n* A lot of thanks for important suggestions goes to Konstantin Käfer who implemented a nice similar module node-zlib (https://github.com/kkaefer/node-zlib) earlier than me;\n* Oleg Kertanov, pccowboy, addisonj, David Swift\n\n## Author\n\nEgor Egorov <me@egorfine.com>.\n\n","publish_time":1320669067099,"_cnpm_publish_time":1320669067099,"dist-tags":{"latest":"1.2.2"}}