{"_id":"zlibjs","_rev":"39-a6d4b0402b96a92376332d052d8c8aa5","name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.7":{"author":{"name":"Yuta Imaya"},"contributors":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","version":"0.1.7","main":"./bin/node-zlib.js","homepage":"https://github.com/imaya/zlib.js","repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"devDependencies":{"buster":">=0.6.3"},"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"node_modules/.bin/buster-test"},"bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"dependencies":{},"_id":"zlibjs@0.1.7","dist":{"shasum":"f3b64f09b2215f0ea3c0f6fe65e483b1fe3df15a","tarball":"https://registry.npmjs.org/zlibjs/-/zlibjs-0.1.7.tgz","integrity":"sha512-EcAZXM/Gefw85ycnpFpYEFRHP3RPsh01pemPxpB07TlOkQZb4obdDJWbvr9JzVmuthBcddEhmq1NXS5BqnbRWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFUhijzyGAH5MHr6Mt1wJAwYa7Aa49d1QaQ7nhpCHNuAiA3tQpaX688bMt1lNjEMLtrRezmQue360JHShub36pXKg=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"imaya","email":"imaya.devel@gmail.com"},"maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}]},"0.1.8":{"author":{"name":"Yuta Imaya"},"contributors":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","version":"0.1.8","main":"./bin/node-zlib.js","homepage":"https://github.com/imaya/zlib.js","repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"dependencies":{},"devDependencies":{"buster":">=0.6.3"},"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"node_modules/.bin/buster-test"},"bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"_id":"zlibjs@0.1.8","dist":{"shasum":"085dd944071f0d56806ef94b669513b9d460d267","tarball":"https://registry.npmjs.org/zlibjs/-/zlibjs-0.1.8.tgz","integrity":"sha512-K6TlrudzpjDHG6/uzyq8X9/2UFrcSLKhqxZc2nP1fc85vJdhPVehsyElowkI6sqYdF/QA3HA81oEBBLKXCyENA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBN5Sn+kzA8J9dVZVILRa5FgWRpcCnMFkH15ce+mBwPjAiBA07IdqqcQvLxf+z9wsSlHky0ORWZH/WHMBwwPj8822g=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"imaya","email":"imaya.devel@gmail.com"},"maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}]},"0.2.0":{"author":{"name":"Yuta Imaya"},"contributors":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","version":"0.2.0","main":"./bin/node-zlib.js","homepage":"https://github.com/imaya/zlib.js","repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"dependencies":{},"devDependencies":{"buster":">=0.7.4"},"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"node_modules/.bin/buster-test"},"bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"_id":"zlibjs@0.2.0","dist":{"shasum":"ae20f06243293d85c255563189f9b12f5b3ba1a0","tarball":"https://registry.npmjs.org/zlibjs/-/zlibjs-0.2.0.tgz","integrity":"sha512-UA5w5YE92YlkBgr2qk4G3rNrOskQqHy0b/vhlU1U+MKeEHAASJ787MiXBUUsEuHO5t0pwKZ7VOAEJMJhLXcJsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwylNdX8RaYP0H5cerEqxCAhUSL+frtSdYG539rx79JAIhAIMRHwMHxrR6ad4WQL5uW3prCjhULAT+XGQIKNG/uLbW"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"imaya","email":"imaya.devel@gmail.com"},"maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}]},"0.3.0":{"author":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","version":"0.3.0","license":"MIT","main":"./bin/node-zlib.js","homepage":"https://github.com/imaya/zlib.js","repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"dependencies":{},"devDependencies":{"babel-preset-env":"^1.5.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.24.1","grunt":"^1.0.1","grunt-closure-tools":"^0.9.9","grunt-contrib-concat":"^1.0.1","karma":"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-espower-preprocessor":"^1.1.0","karma-mocha":"^1.2.0","karma-mocha-reporter":"^2.2.0","karma-power-assert":"0.0.4","karma-sinon":"^1.0.5","mocha":"^3.1.0","power-assert":"^1.4.1"},"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"npm run test-mocha && npm run test-karma","test-mocha":"mocha --compilers js:babel-register test/nodejs/node-test.js","test-karma":"karma start --single-run"},"gitHead":"03c7a24f3ea177f6eb4f2b5e51d5f443d807f3da","bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"_id":"zlibjs@0.3.0","_shasum":"c50780fe29a1843f85983b6805d48d0f0ca07ab3","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"imaya","email":"imaya.devel@gmail.com"},"maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}],"dist":{"shasum":"c50780fe29a1843f85983b6805d48d0f0ca07ab3","tarball":"https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.0.tgz","integrity":"sha512-hgiJmjGdPoz4iyHBiX1EfuPmN8D+Ya28k9GySgmEOWnOqaMEEFve8yzLGe5DjTjjqrsPHrZVNRW/FxTPPKylzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSNDwgo/lZtPVbEAJ8Z+SoA97r4i09fUCjmip/n7AuYQIgRWR9Cs9e+kCVTB1H3+VA8ukvUwB43XnsKpbW08bUFo0="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zlibjs-0.3.0.tgz_1496261701547_0.6173456315882504"}},"0.3.1":{"author":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"name":"zlibjs","description":"zlib, gzip and zip implementation in JavaScript","version":"0.3.1","license":"MIT","main":"./bin/node-zlib.js","homepage":"https://github.com/imaya/zlib.js","repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"dependencies":{},"devDependencies":{"babel-preset-env":"^1.5.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.24.1","grunt":"^1.0.1","grunt-closure-tools":"^0.9.9","grunt-contrib-concat":"^1.0.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-espower-preprocessor":"^1.1.0","karma-firefox-launcher":"^1.0.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.3","karma-power-assert":"^1.0.0","karma-sinon":"^1.0.5","mocha":"^3.1.0","power-assert":"^1.4.4","sinon":"^2.3.2"},"files":["README.md","README.en.md","ChangeLog.md","LICENSE","bin","package.json"],"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"npm run test-mocha && npm run test-karma","test-mocha":"mocha --compilers js:babel-register test/nodejs/node-test.js","test-karma":"karma start --single-run"},"gitHead":"2701521273ed7a9741c9a7827fa8de51d8843f7f","bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"_id":"zlibjs@0.3.1","_shasum":"50197edb28a1c42ca659cc8b4e6a9ddd6d444554","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"imaya","email":"imaya.devel@gmail.com"},"maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}],"dist":{"shasum":"50197edb28a1c42ca659cc8b4e6a9ddd6d444554","tarball":"https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.1.tgz","integrity":"sha512-+J9RrgTKOmlxFSDHo0pI1xM6BLVUv+o0ZT9ANtCxGkjIVCCUdx9alUF8Gm+dGLKbkkkidWIHFDZHDMpfITt4+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS53t5PSgtrdChTS5YFAMNdozrPtPpH5sfUTHWgBXq6QIgJCBScyxmK+RNksnCRNbGoGcqkQVZ35Tk8cKstjlHSTU="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zlibjs-0.3.1.tgz_1499381892081_0.03805652796290815"}}},"readme":"zlib.js\n=======\n\n[![Build Status](https://travis-ci.org/imaya/zlib.js.png?branch=master)](https://travis-ci.org/imaya/zlib.js)\n\n[Japanese version](./README.md)\n\nzlib.js is ZLIB(RFC1950), DEFLATE(RFC1951), GZIP(RFC1952) and PKZIP implementation in JavaScript.\n\n\nUsage\n------\n\nUse one in \"bin\" directory.\n\n- zlib_and_gzip.min.js: ZLIB + GZIP\n    + (Raw)\n        * rawdeflate.js: Raw Deflate\n        * rawinflate.js: Raw Inflate\n    + zlib.min.js: ZLIB Inflate + Deflate\n        * inflate.min.js: ZLIB Inflate\n        * deflate.min.js: ZLIB Deflate\n        * inflate_stream.min.js: ZLIB Inflate (stream mode)\n    + (GZIP)\n        * gzip.min.js: GZIP\n        * gunzip.min.js: GUNZIP\n    + (PKZIP)\n        * zip.min.js ZIP\n        * unzip.min.js UNZIP\n- node-zlib.js: (ZLIB + GZIP for node.js)\n\n\n### Compression\n\n#### Raw Deflate\n\n```js\n// plain = Array.<number> or Uint8Array\nvar deflate = new Zlib.RawDeflate(plain);\nvar compressed = deflate.compress();\n```\n\n#### Raw Deflate Option\n\nSee ZLIB Option.\n\n#### ZLIB\n\n```js\n// plain = Array.<number> or Uint8Array\nvar deflate = new Zlib.Deflate(plain);\nvar compressed = deflate.compress();\n```\n\n##### ZLIB Option\n\nSecond argument of Zlib.Deflate constructor\n\n```js\n{\n    compressionType: Zlib.Deflate.CompressionType, // compression type\n    lazy: number // lazy matching parameter\n}\n```\n\n<code>Zlib.Deflate.CompressionType</code> is enumerable,\nChoose one in <code>NONE</code> (Store), <code>FIXED</code> (Fixed Huffman Coding), <code>DYNAMIC</code> (Dynamic Huffman Coding).\nDefault value is <code>DYNAMIC</code>.\n\n<code>lazy</code> is Lazy Matching length.\nThis parameter is deprecated.\n\n\n#### GZIP\n\nGZIP implementation is incomplete.\nHowever, there is no problem in usual use. \n\n```js\n// plain = Array.<number> or Uint8Array\nvar gzip = new Zlib.Gzip(plain);\nvar compressed = gzip.compress();\n```\n\n\n##### GZIP Option\n\n```js\n{\n    deflateOptions: Object, // see: deflate option (ZLIB Option)\n    flags: {\n        fname: boolean, // use filename?\n        comment: boolean, // use comment?\n        fhcrc: boolean // use file checksum?\n    },\n    filename: string, // filename\n    comment: string // comment\n}\n```\n\n\n#### PKZIP\n\n```js\nvar zip = new Zlib.Zip();\n// plainData1\nzip.addFile(plainData1, {\n    filename: stringToByteArray('foo.txt')\n});\nzip.addFile(plainData2, {\n    filename: stringToByteArray('bar.txt')\n});\nzip.addFile(plainData3, {\n    filename: stringToByteArray('baz.txt')\n});\nvar compressed = zip.compress();\n\nfunction stringToByteArray(str) {\n    var array = new (window.Uint8Array !== void 0 ? Uint8Array : Array)(str.length);\n    var i;\n    var il;\n\n    for (i = 0, il = str.length; i < il; ++i) {\n        array[i] = str.charCodeAt(i) & 0xff;\n    }\n\n    return array;\n}\n```\n\n##### PKZIP Option\n\nfilename, comment, extraField are must use Uint8Array if enabled Typed Array.\n\n```js\n{\n    filename: (Array.<number>|Uint8Array), // filename\n    comment: (Array.<number>|Uint8Array), //comment\n    extraField: (Array.<number>|Uint8Array), // extra field\n    compress: boolean, // compress when called \"addFile\" method.\n    compressionMethod: Zlib.Zip.CompressionMethod, // STORE or DEFLATE\n    os: Zlib.Zip.OperatingSystem, // MSDOS or UNIX or MACINTOSH\n    deflateOption: Object // see: ZLIB Option\n}\n```\n\n### Decompression\n\n#### Raw Deflate\n\n```js\n// compressed = Array.<number> or Uint8Array\nvar inflate = new Zlib.RawInflate(compressed);\nvar plain = inflate.decompress();\n```\n\n#### Raw Deflate Option\n\nSee ZLIB Option.\n\n#### ZLIB\n\n```js\n// compressed = Array.<number> or Uint8Array\nvar inflate = new Zlib.Inflate(compressed);\nvar plain = inflate.decompress();\n```\n\n##### ZLIB Option\n\nSecond argument of Zlib.Inflate constructor\n\n```js\n{\n    'index': number, // start position in input buffer \n    'bufferSize': number, // initial output buffer size\n    'bufferType': Zlib.Inflate.BufferType, // buffer expantion type\n    'resize': boolean, // resize buffer(ArrayBuffer) when end of decompression (default: false)\n    'verify': boolean  // verify decompression result (default: false)\n}\n```\n\n<code>Zlib.Inflate.BufferType</code> is enumerable.\nChoose one <code>ADAPTIVE</code>(default) and <code>BLOCK</code>.\n\n- <code>ADAPTIVE</code>: buffer expansion based on compression ratio in filled buffer.\n- <code>BLOCK</code>: buffer expansion based on <code>BufferSize</code>.\n\n\n#### GZIP\n\n```js\n// compressed = Array.<number> or Uint8Array\nvar gunzip = new Zlib.Gunzip(compressed);\nvar plain = gunzip.decompress();\n```\n\n\n#### PKZIP\n\n\n```js\n// compressed = Array.<number> or Uint8Array\nvar unzip = new Zlib.Unzip(compressed);\nvar filenames = unzip.getFilenames();\nvar plain = unzip.decompress(filenames[0]);\n```\n\n\n### Node.js\n\nsee unit tests.\n<https://github.com/imaya/zlib.js/blob/master/test/node-test.js>\n\n\n## Debug\n\nIf you want to know the code before compile, SourceMaps and PrettyPrint can be used.\n\n\n### Source Map\n\nIf you want to use the Source Map, use `dev` version.\n\nFor example, you want to use Inflate with Source Map.\n\n    - inflate.min.js // release version\n    - inflate.dev.min.js // development version <- use this\n\n\n### Pretty Print\n\n`zlib.pretty.js` is not renamed symbol.\n\n\nHow to build\n------------\n\nBuild using Grunt and Closure Compiler.\n\n### Requirement\n\n- Grunt\n- Python\n\n### Build\n\nUse \"grunt\" command.\n\n```\n$ grunt [target]\n```\n\n#### Build target\n\ntarget         | generate file         | implementation\n---------------|-----------------------|-------------\ndeps           | deps.js               | (dependency: deps.js)\ndeflate        | deflate.min.js        | ZLIB Deflate\ninflate        | inflate.min.js        | ZLIB Inflate\ninflate_stream | inflate_stream.min.js | ZLIB Inflate (stream)\nzlib           | zlib.min.js           | ZLIB Deflate + Inflate\ngzip           | gzip.min.js           | GZIP Compression\ngunzip         | gunzip.min.js         | GZIP Decompression\nzlib_and_gzip  | zlib_and_gzip.min.js  | ZLIB + GZIP\nnode           | node-zlib.js          | ZLIB + GZIP for node.js\nzip            | zip.min.js            | PKZIP Compression\nunzip          | unzip.min.js          | PKZIP Decompression\nall            | *                     | default target\n\n\nTest\n------\n\nUnit tests are using Karma and mocha.\n\n```\n$ npm test\n```\n\n### Browser only\n\n```\n$ npm run test-karma\n```\n\n### Node.js only\n\n```\n$ npm run test-mocha\n```\n\n\nIssue\n-----\n\nPreset dictionary is not implemented.\n\n\nLicense\n--------\n\nCopyright &copy; 2012 imaya.\nLicensed under the MIT License.\n","maintainers":[{"name":"imaya","email":"imaya.devel@gmail.com"}],"time":{"modified":"2022-06-29T17:38:38.217Z","created":"2014-02-07T03:34:43.440Z","0.1.7":"2014-02-07T03:34:49.863Z","0.1.8":"2014-02-17T01:49:26.253Z","0.1.9":"2014-02-20T15:09:01.732Z","0.2.0":"2014-02-21T02:15:36.486Z","0.3.0":"2017-05-31T20:15:02.025Z","0.3.1":"2017-07-06T22:58:12.278Z"},"readmeFilename":"README.en.md","author":{"name":"Yuta Imaya","email":"imaya.devel@gmail.com"},"repository":{"type":"git","url":"git://github.com/imaya/zlib.js.git"},"homepage":"https://github.com/imaya/zlib.js","bugs":{"url":"https://github.com/imaya/zlib.js/issues"},"users":{"crowelch":true,"hillct":true},"license":"MIT"}