{"_id":"deflate","_rev":"21-6b6ce3be9ee11ab3cadbed83307aa353","name":"deflate","description":"super-simple streaming gzip, wrapping native zlib [DEPRECATED]","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib (deflate/inflate)","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.0","author":{"name":"John Hewson"},"repository":{"type":"git","url":"git://github.com/jahewson/node-deflate.git"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"dependencies":{},"devDependencies":{},"_id":"deflate@1.0.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"e053b9845cbafefa4c829ce79ad83c4af60faafa","bin":{"0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0":{"shasum":"fd8a952af9bdce685c899bb6dd3cb5e908f6fac1","tarball":"http://registry.npmjs.org/deflate/-/deflate-1.0.0-0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0.tgz"}},"tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.0.tgz","integrity":"sha512-/nnI18nyi5c3Q6+ViITCaFp7r9I7zPvHVd7ogJn0chL5kYLNukCyED0v8BQx50qdlEl1e1eD64Qo7dE2GxD/pQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5lhOqLwlK/xiaSiyWblgf7WrCxLRd8Nz2kHepeRih+AIgMSxvgXAVlCUX8BacajbcX69LHXVp7mdhwfsJBznIFk8="}]},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib (deflate/inflate)","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.1","author":{"name":"John Hewson"},"repository":{"type":"git","url":"git://github.com/jahewson/node-deflate.git"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"dependencies":{},"devDependencies":{},"_id":"deflate@1.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"e4d53653b878da677f92c695ab3771d1693518bd","bin":{"0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0":{"shasum":"c3e5f9aa25013ef2f18fa610698df19c468b8c58","tarball":"http://registry.npmjs.org/deflate/-/deflate-1.0.1-0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0.tgz"}},"tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.1.tgz","integrity":"sha512-FHCy0FEErdhpNO0MwFHvqxlazKrIeulsWJnCBfIeXXjR6ib6PJFTb8XmMW2ZVbvlc6kRVsRjGXHY0/5Zu4sLpA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPOb4sXMNskgVlBo3qQH9ulG+Z1UISwic6sVXgKTcGwgIgNoiaPbJ5iTMpS6jQQUPK6GxUbycg4IwNnOgVlmUEb1k="}]},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.2":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib (deflate/inflate)","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.2","author":{"name":"John Hewson"},"repository":{"type":"git","url":"git://github.com/jahewson/node-deflate.git"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"dependencies":{},"devDependencies":{},"_id":"deflate@1.0.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"e761952074eb49716db56f6dec456f59e40521f8","bin":{"0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0":{"shasum":"e1f80af81ba837ebd8cd04ec3ed9bd507096ed97","tarball":"http://registry.npmjs.org/deflate/-/deflate-1.0.2-0.4-ares1.7.4-ev4.4-openssl0.9.8l-v83.1.8.10-darwin-10.8.0.tgz"}},"tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.2.tgz","integrity":"sha512-g63gk7I37c6N4cdncxWzxkjKrISB/B50afvUTWJcfx19C+CfZJvqM/r9GMuuSlBux8cfT4MmS+IFgm6ICPtI0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5uxpv0b90h/Sd6n/ExN8ue9JxTwMGURu7mo+HzJNRZgIhAPnJTcZ8J/FhgWooBTfXQQjVrdOWgZBF6NmdcjgWvjWj"}]},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.3":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib (deflate/inflate)","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.3","author":{"name":"John Hewson"},"repository":{"type":"git","url":"git://github.com/jahewson/node-deflate.git"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"dependencies":{},"devDependencies":{},"_id":"deflate@1.0.3","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"06388e050a1bc2d4f984998c3afe06cc52a5db7f","bin":{"0.4-ares1.7.4-ev4.4-openssl0.9.8r-v83.1.8.26-darwin-11.0.0":{"shasum":"37ab457d553f7f474f7e4126a985a8eea4d2cd53","tarball":"http://registry.npmjs.org/deflate/-/deflate-1.0.3-0.4-ares1.7.4-ev4.4-openssl0.9.8r-v83.1.8.26-darwin-11.0.0.tgz"}},"tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.3.tgz","integrity":"sha512-blGCy8qSGyirWj4uYbFw34gDp66X1R0LF7ff8DjxElnVm8aesPQerO7XVZ2FJHNm6rVEJdRnuVplq/EGoCYPsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ2ZZcnL9C3dss5QmSQMEMha/k01/MSe1gOAq8SX6T3gIhAO9Q+vfRDF40utWCWEKgUqIueFDL4c6FY6IDJFRZFT3q"}]},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.4":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib (deflate/inflate)","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.4","author":{"name":"John Hewson"},"repository":{"type":"git","url":"git://github.com/jahewson/node-deflate.git"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"_npmUser":{"name":"jahewson","email":"johnahewson@yahoo.co.uk"},"_id":"deflate@1.0.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"101c2e1bdf99305c462564867cea2fd3185eb543","tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.4.tgz","integrity":"sha512-XV9iT4P3OzA/PWbrzMf3bLSsJhIbaaj/zyC47lkflbZSGy0ybfO9DKzsbmn7c9dM5lqp7uQqhHVmifSZAPze/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE7mJfjh3M3ibaZHEzCx9ydMt3kywiKhuD+z53PMRDDwIhAMZj6IK3PhNXSsKvy22eYJ5GhZcasj8XUo9CUzeeM+WZ"}]},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.5":{"name":"deflate","description":"super-simple streaming gzip, wrapping native zlib [DEPRECATED]","homepage":"https://github.com/jahewson/node-deflate","bugs":{"url":"https://github.com/jahewson/node-deflate/issues"},"version":"1.0.5","author":{"name":"John Hewson"},"repository":{"type":"git","url":"https://github.com/jahewson/node-deflate"},"engine":["node >=0.4.0"],"main":"./lib","scripts":{"install":"./build.sh"},"readme":"# *DEPRECATED* - node.js v0.6 has a built-in [ZLIB API](http://nodejs.org/docs/v0.6.2/api/zlib.html)\n\n# deflate -- gzip, zlib, and deflate for node.js\nStreaming [DEFLATE](http://tools.ietf.org/html/rfc1951) (RFC 1951), [ZLIB](http://tools.ietf.org/html/rfc1950)\n(RFC 1950) and [GZIP](http://tools.ietf.org/html/rfc1952) (RFC 1952) compression and expansion for\n[node.js](http://nodejs.org/).\n\nuses native [zlib](http://zlib.net).\n\n## Install\n\n    npm install deflate\n\nor from source:\n\n    git clone git://github.com/jahewson/node-deflate.git\n    cd node-deflate\n    ./build.sh\n\n## Examples\n\nYou'll need to start with:\n\n    var deflate = require('deflate');\n\n### Buffer (Synchronous)\n\nSynchronously deflate a `Buffer` which contains all data to be compressed:\n\n\tvar gzip = deflate.deflateSync(fs.ReadFileSync('example.txt'));\n\t\nSynchronously inflate a `Buffer` which contains all compressed data:\n\n\tvar data = deflate.inflateSync(fs.ReadFileSync('example.gz'));\n\n### Stream (Asynchronous)\n\nAny `ReadableStream` can be wrapped with a `DeflateStream`, which we can `pipe` into a `WritableStream`.\n\n\t// wrap input stream with deflate\n\tvar input = fs.createReadStream('example.gz');\n\tinput = deflate.createDeflateStream(input);\n\t\n\t// pipe to output stream\n\tvar output = fs.createWriteStream('example.txt');\n\tinput.pipe(output);\n\t\nAny `ReadableStream` can be wrapped with an `InflateStream`, which we can `pipe` into a `WritableStream`.\n\n\t// wrap input stream with inflate\n\tvar input = fs.createReadStream('example.bmp');\n\tinput = deflate.createInflateStream(input);\n\t\n\t// pipe to output stream\n\tvar output = fs.createWriteStream('example.gz');\n\tinput.pipe(output);\n\n### Low-level API\n\nIf the `Stream` interface doesn't meet your needs, you can access the low-level API directly, via\nthe `Flater` class. See the implementation of `DelateStream` and `InflateStream` to learn how to use\nthe low-level API. All low-level functions are synchronous.\n\n## Options\n\n### deflate(buffer, level=6)\nDeflates a gzip formatted `Buffer`. `level` sets the compression level from `0` (uncompressed) to `9` (highly compressed), \na smaller number is faster.\n\n### deflate(buffer, format='gzip', level=6)\nDeflates a buffer.\n\n`format` can be `gzip`, `zlib`, or `deflate`.\n\n`level` sets the compression level from `0` (uncompressed) to `9` (highly compressed), \na smaller number is faster.\n\n### createDeflateStream(readStream, level=6)\nCreates a `Stream` which wraps `readStream` to deflates gzip content.\n\n`level` sets the compression level from `0` (uncompressed) to `9`, a smaller number is faster.\n\n### createDeflateStream(readStream, format='gzip', level=6, bufferSize=131072)\nCreates a `Stream` which wraps `readStream` to deflate its content.\n\n`format` can be `gzip`, `zlib`, or `deflate`.\n\n`level` sets the compression level from `0` (uncompressed) to `9` (highly compressed), \na smaller number is faster.\n\n`bufferSize` is the size of the output buffer in bytes. Output data is buffered until it reaches\nthis size, with the exception of the final chunk. The default is 128K.\n\n### inflate(buffer, format='gzip')\nInflates a `Buffer`.\n\n`format` can be `gzip`, `zlib`, or `deflate`.\n\n### createInflateStream(readStream, format='gzip')\nCreates a `Stream` which wraps `readStream` to inflate its content.\n\n`format` can be `gzip`, `zlib`, or `deflate`.\n\n## Tests\nTests require [nodeunit](https://github.com/caolan/nodeunit), you can run them all with:\n\t\n\tcd node-deflate\n    nodeunit test\n\t\n## Background\n\nThere are many gzip modules for node.js, some just wrap the command-line `gzip`/`gunzip`,\nothers wrap zlib, but none are mature or well-maintained, so I decided to\ninvest some time to write node-deflate. Hopefully you'll find it useful.\n\n## Acknowledgements\n\nThe starting point for node-deflate was the zlib [Usage Example](http://zlib.net/zpipe.c)\npublic domain C code by Mark Adler (see [Adler32](http://en.wikipedia.org/wiki/Adler-32)).","readmeFilename":"README.md","_id":"deflate@1.0.5","dist":{"shasum":"fddc72b33ba989bb4e717cf1cace5f923abdc857","tarball":"https://registry.npmjs.org/deflate/-/deflate-1.0.5.tgz","integrity":"sha512-oAKVj16TL7b3bMYjQJaLuflAc37gln3f31IbbnX/S+KXzxj8wyugnrvZu/cb5NRWtPf6hyUUnu5134BKbUfwDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvEf00fNxiH281BiJVXKWKfyY8br83e7MuAycCRACYpAiAHh22WRB1M0OJCFspyDCx2EMIEz8lnnS/lx0BeOK3O0g=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jahewson","email":"john@jahewson.com"},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"maintainers":[{"name":"jahewson","email":"johnahewson@yahoo.co.uk"}],"time":{"modified":"2022-06-14T23:31:21.542Z","created":"2011-08-31T20:09:16.452Z","1.0.0":"2011-08-31T20:09:17.328Z","1.0.1":"2011-08-31T23:28:48.316Z","1.0.2":"2011-09-07T10:18:23.653Z","1.0.3":"2011-09-30T18:23:21.533Z","1.0.4":"2012-07-26T22:03:57.228Z","1.0.5":"2013-11-22T01:33:32.933Z"},"author":{"name":"John Hewson"},"repository":{"type":"git","url":"https://github.com/jahewson/node-deflate"},"users":{"fgribreau":true}}