-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
58 lines (58 loc) · 6.48 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"name": "pako",
"description": "zlib port to javascript - fast, modularized, with browser support",
"version": "0.2.5",
"keywords": [
"zlib",
"deflate",
"inflate",
"gzip"
],
"homepage": "https://github.com/nodeca/pako",
"contributors": [
{
"name": "Andrei Tuputcyn",
"url": "https://github.com/andr83"
},
{
"name": "Vitaly Puzrin",
"url": "https://github.com/puzrin"
}
],
"bugs": {
"url": "https://github.com/nodeca/pako/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/nodeca/pako/blob/master/LICENSE"
},
"repository": {
"type": "git",
"url": "git://github.com/nodeca/pako.git"
},
"main": "./index.js",
"devDependencies": {
"mocha": "*",
"benchmark": "*",
"ansi": "*",
"browserify": "*",
"uglify-js": "*",
"jshint": "*",
"istanbul": "*",
"ndoc": "*",
"lodash": "*",
"async": "*",
"grunt": "~0.4.4",
"grunt-cli": "~0.1.13",
"grunt-saucelabs": "~8.0.2",
"grunt-contrib-connect": "~0.7.1"
},
"readme": "pako - zlib port to javascript, very fast!\n==========================================\n\n[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako)\n[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako)\n\n__Why pako is cool:__\n\n- Almost as fast in modern JS engines as C implementation (see benchmarks).\n- Works in browsers, you can browserify any separate component.\n- Chunking support for big blobs.\n- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported).\n\nThis project was done to understand how fast JS can be and is it necessary to\ndevelop native C modules for CPU-intensive tasks. Enjoy the result!\n\n\n__Famous projects, using pako:__\n\n- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib))\n- [JSZip](http://stuk.github.io/jszip/)\n- [mincer](https://github.com/nodeca/mincer)\n- [JS-Git](https://github.com/creationix/js-git) and\n [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf)\n by [@creatronix](https://github.com/creationix)\n\n \n\n__Benchmarks:__\n\n```\nnode v0.10.26, 1mb sample:\n\n deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled)\n deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled)\n deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled)\n ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled)\n deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled)\n deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled)\n * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled)\n inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled)\n inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled)\n ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled)\n inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled)\n inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled)\n * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled)\n\nnode v0.11.12, 1mb sample:\n\n deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled)\n deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled)\n deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled)\n ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled)\n deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled)\n deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled)\n * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled)\n inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled)\n inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled)\n ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled)\n inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled)\n inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled)\n * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled)\n```\n\nzlib's test is partialy afferted by marshling (that make sense for inflate only).\nYou can change deflate level to 0 in benchmark source, to investigate details.\nFor deflate level 6 results can be considered as correct.\n\n__Install:__\n\nnode.js:\n\n```\nnpm install pako\n```\n\nbrowser:\n\n```\nbower install pako\n```\n\n\nExample & API\n-------------\n\nFull docs - http://nodeca.github.io/pako/\n\n```javascript\nvar pako = require('pako');\n\n// Deflate\n//\nvar input = new Uint8Array();\n//... fill input data here\nvar output = pako.deflate(input);\n\n// Inflate (simple wrapper can throw exception on broken stream)\n//\nvar compressed = new Uint8Array();\n//... fill data to uncompress here\ntry {\n var result = pako.inflate(compressed);\ncatch (err) {\n console.log(err);\n}\n\n//\n// Alternate interface for chunking & without exceptions\n//\n\nvar inflator = new pako.Inflate();\n\ninflator.push(chunk1, false);\ninflator.push(chunk2, false);\n...\ninflator.push(chunkN, true); // true -> last chunk\n\nif (inflator.err) {\n console.log(inflator.msg);\n}\n\nvar output = inflator.result;\n\n```\n\nSometime you can wish to work with strings. For example, to send\nbig objects as json to server. Pako detects input data type. You can\nforce output to be string with option `{ to: 'string' }`.\n\n```javascript\nvar pako = require('pako');\n\nvar test = { my: 'super', puper: [456, 567], awesome: 'pako' };\n\nvar binaryString = pako.deflate(JSON.stringify(test), { to: 'string' });\n\n//\n// Here you can do base64 encode, make xhr requests and so on.\n//\n\nvar restored = JSON.parse(pako.inflate(binaryString, { to: 'string' }));\n```\n\n\nNotes\n-----\n\nPako does not contain some specific zlib functions:\n\n- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`,\n `deflatePending`, `deflatePrime`, `deflateSetDictionary`, `deflateTune`.\n- __inflate__ - `inflateGetDictionary`, `inflateCopy`, `inflateMark`,\n `inflatePrime`, `inflateSetDictionary`, `inflateSync`, `inflateSyncPoint`,\n `inflateUndermine`.\n\n\nAuthors\n-------\n\n- Andrey Tupitsin [@anrd83](https://github.com/andr83)\n- Vitaly Puzrin [@puzrin](https://github.com/puzrin)\n\nPersonal thanks to Vyacheslav Egorov ([@mraleph](https://github.com/mraleph))\nfor his awesome tutoruals about optimising JS code for v8,\n[IRHydra](http://mrale.ph/irhydra/) tool and his advices.\n\n\nLicense\n-------\n\nMIT\n",
"readmeFilename": "README.md",
"_id": "pako@0.2.5",
"dist": {
"shasum": "99cea83a2032940ab7956c7b206c7f8feb1eafea"
},
"_from": "pako@~0.2.0",
"_resolved": "https://registry.npmjs.org/pako/-/pako-0.2.5.tgz"
}