mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature(zip) pako v0.2.0
This commit is contained in:
parent
2d23b808cb
commit
24269434e1
13 changed files with 2028 additions and 846 deletions
|
|
@ -20,7 +20,10 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Key.unsetBind();
|
||||
addOverLayClick();
|
||||
},
|
||||
beforeClose : Key.setBind,
|
||||
beforeClose : function() {
|
||||
Key.setBind();
|
||||
console.trace();
|
||||
},
|
||||
fitToView : true,
|
||||
loop : false,
|
||||
openEffect : 'none',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "pako",
|
||||
"main": "dist/pako.js",
|
||||
"version": "0.1.1",
|
||||
"version": "0.2.0",
|
||||
"homepage": "https://github.com/nodeca/pako",
|
||||
"authors": [
|
||||
"Andrei Tuputcyn <Andrew.Tupitsin@gmail.com>",
|
||||
|
|
@ -26,14 +26,14 @@
|
|||
"benchmark",
|
||||
"coverage"
|
||||
],
|
||||
"_release": "0.1.1",
|
||||
"_release": "0.2.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.1.1",
|
||||
"commit": "160301218a747105cd5803ab76812b6074dd4399"
|
||||
"tag": "0.2.0",
|
||||
"commit": "e93c614f7ab3db2f9d39be66fa54e4b2c6fc08e0"
|
||||
},
|
||||
"_source": "git://github.com/nodeca/pako.git",
|
||||
"_target": "~0.1.1",
|
||||
"_target": "~0.2.0",
|
||||
"_originalSource": "pako",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -60,6 +60,7 @@ module.exports = function(grunt) {
|
|||
urls: ['http://127.0.0.1:9999/test/browser/test.html'],
|
||||
build: process.env.TRAVIS_JOB_ID || ('local' + ~~(Math.random()*1000)),
|
||||
browsers: browsers,
|
||||
concurrency: 3,
|
||||
testname: process.env.SAUCE_PROJ || 'mocha tests'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
0.2.0 / 2014-04-18
|
||||
------------------
|
||||
|
||||
- Added custom gzip headers support.
|
||||
- Added strings support.
|
||||
- Improved memory allocations for small chunks.
|
||||
- ZStream properties rename/cleanup.
|
||||
- More coverage tests.
|
||||
|
||||
|
||||
0.1.1 / 2014-03-20
|
||||
-------------------
|
||||
------------------
|
||||
|
||||
- Bugfixes for inflate/deflate.
|
||||
|
||||
|
||||
0.1.0 / 2014-03-15
|
||||
-------------------
|
||||
------------------
|
||||
|
||||
- First release.
|
||||
|
|
|
|||
|
|
@ -7,42 +7,54 @@ __Why pako is cool:__
|
|||
|
||||
- Almost as fast in modern JS engines as C implementation (see benchmarks).
|
||||
- Works in browsers, you can browserify any separate component.
|
||||
- Both Sync & streamable (for big blobs) interfaces.
|
||||
- It's fresh - ports the latest zlib version (now 1.2.8), results are binary equal.
|
||||
- Chunking support for big blobs.
|
||||
- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported).
|
||||
|
||||
This project was done to understand how fast JS can be and is it necessary to
|
||||
develop native C modules for CPU-intensive tasks. Enjoy the result!
|
||||
|
||||
|
||||
__Famous projects, using pako:__
|
||||
|
||||
- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib))
|
||||
- [JSZip](http://stuk.github.io/jszip/)
|
||||
- [mincer](https://github.com/nodeca/mincer)
|
||||
|
||||
|
||||
__Benchmarks:__
|
||||
|
||||
```
|
||||
node v0.10.26, 1mb sample:
|
||||
|
||||
deflate-dankogai x 4.74 ops/sec ±0.68% (15 runs sampled)
|
||||
deflate-gildas x 4.61 ops/sec ±1.73% (15 runs sampled)
|
||||
deflate-imaya x 3.10 ops/sec ±3.73% (11 runs sampled)
|
||||
! deflate-pako x 7.11 ops/sec ±0.26% (21 runs sampled)
|
||||
deflate-pako-untyped x 4.34 ops/sec ±1.35% (14 runs sampled)
|
||||
deflate-zlib x 14.34 ops/sec ±2.90% (68 runs sampled)
|
||||
inflate-dankogai x 31.29 ops/sec ±0.72% (56 runs sampled)
|
||||
inflate-imaya x 30.49 ops/sec ±0.84% (53 runs sampled)
|
||||
! inflate-pako x 70.00 ops/sec ±1.60% (71 runs sampled)
|
||||
inflate-pako-untyped x 17.67 ops/sec ±1.27% (33 runs sampled)
|
||||
inflate-zlib x 70.82 ops/sec ±1.69% (81 runs sampled)
|
||||
deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled)
|
||||
deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled)
|
||||
deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled)
|
||||
! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled)
|
||||
deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled)
|
||||
deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled)
|
||||
* deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled)
|
||||
inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled)
|
||||
inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled)
|
||||
! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled)
|
||||
inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled)
|
||||
inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled)
|
||||
* inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled)
|
||||
|
||||
node v0.11.11, 1mb sample:
|
||||
node v0.11.12, 1mb sample:
|
||||
|
||||
deflate-dankogai x 5.61 ops/sec ±0.30% (17 runs sampled)
|
||||
deflate-gildas x 4.97 ops/sec ±5.68% (16 runs sampled)
|
||||
deflate-imaya x 3.53 ops/sec ±4.19% (12 runs sampled)
|
||||
! deflate-pako x 11.52 ops/sec ±0.23% (32 runs sampled)
|
||||
deflate-pako-untyped x 5.12 ops/sec ±1.44% (17 runs sampled)
|
||||
deflate-zlib x 14.33 ops/sec ±3.34% (63 runs sampled)
|
||||
inflate-dankogai x 42.96 ops/sec ±0.19% (57 runs sampled)
|
||||
inflate-imaya x 85.05 ops/sec ±1.07% (71 runs sampled)
|
||||
! inflate-pako x 97.58 ops/sec ±0.69% (80 runs sampled)
|
||||
inflate-pako-untyped x 18.06 ops/sec ±0.65% (56 runs sampled)
|
||||
inflate-zlib x 60.60 ops/sec ±2.04% (67 runs sampled)
|
||||
deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled)
|
||||
deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled)
|
||||
deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled)
|
||||
! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled)
|
||||
deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled)
|
||||
deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled)
|
||||
* deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled)
|
||||
inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled)
|
||||
inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled)
|
||||
! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled)
|
||||
inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled)
|
||||
inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled)
|
||||
* inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled)
|
||||
```
|
||||
|
||||
zlib's test is partialy afferted by marshling (that make sense for inflate only).
|
||||
|
|
@ -107,17 +119,35 @@ var output = inflator.result;
|
|||
|
||||
```
|
||||
|
||||
Sometime you can wish to work with strings. For example, to send
|
||||
big objects as json to server. Pako detects input data type. You can
|
||||
force output to be string with option `{ to: 'string' }`.
|
||||
|
||||
```javascript
|
||||
var pako = require('pako');
|
||||
|
||||
var test = { my: 'super', puper: [456, 567], awesome: 'pako' };
|
||||
|
||||
var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' });
|
||||
|
||||
//
|
||||
// Here you can do base64 encode, make xhr requests and so on.
|
||||
//
|
||||
|
||||
var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' }));
|
||||
```
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
Pako does not contain some specific zlib functions:
|
||||
|
||||
- __deflate__ - writing custom gzip headers and methods `deflateSetDictionary`,
|
||||
`deflateParams`, `deflateSetHeader`, `deflateBound`, `deflatePending`.
|
||||
- __inflate__ - getting custom gzip headers and methods `inflateGetDictionary`,
|
||||
`inflateGetHeader`, `inflateSetDictionary`, `inflateSync`, `inflateSyncPoint`,
|
||||
`inflateCopy`, `inflateUndermine`, `inflateMark`.
|
||||
- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`,
|
||||
`deflatePending`, `deflatePrime`, `deflateSetDictionary`, `deflateTune`.
|
||||
- __inflate__ - `inflateGetDictionary`, `inflateCopy`, `inflateMark`,
|
||||
`inflatePrime`, `inflateSetDictionary`, `inflateSync`, `inflateSyncPoint`,
|
||||
`inflateUndermine`.
|
||||
|
||||
|
||||
Authors
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "pako",
|
||||
"main": "dist/pako.js",
|
||||
"version": "0.1.1",
|
||||
"version": "0.2.0",
|
||||
"homepage": "https://github.com/nodeca/pako",
|
||||
"authors": [
|
||||
"Andrei Tuputcyn <Andrew.Tupitsin@gmail.com>",
|
||||
|
|
|
|||
1163
lib/client/zip/dist/pako.js
vendored
1163
lib/client/zip/dist/pako.js
vendored
File diff suppressed because it is too large
Load diff
6
lib/client/zip/dist/pako.min.js
vendored
6
lib/client/zip/dist/pako.min.js
vendored
File diff suppressed because one or more lines are too long
738
lib/client/zip/dist/pako_deflate.js
vendored
738
lib/client/zip/dist/pako_deflate.js
vendored
File diff suppressed because it is too large
Load diff
4
lib/client/zip/dist/pako_deflate.min.js
vendored
4
lib/client/zip/dist/pako_deflate.min.js
vendored
File diff suppressed because one or more lines are too long
831
lib/client/zip/dist/pako_inflate.js
vendored
831
lib/client/zip/dist/pako_inflate.js
vendored
File diff suppressed because it is too large
Load diff
4
lib/client/zip/dist/pako_inflate.min.js
vendored
4
lib/client/zip/dist/pako_inflate.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name" : "pako",
|
||||
"description" : "zlib port to javascript - fast, modularized, with browser support",
|
||||
"version" : "0.1.1",
|
||||
"version" : "0.2.0",
|
||||
"keywords" : [ "zlib", "deflate", "inflate", "gzip" ],
|
||||
"homepage" : "https://github.com/nodeca/pako",
|
||||
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
"lodash": "2.4.1",
|
||||
"async": "0.2.10",
|
||||
|
||||
"grunt": "~0.4.0",
|
||||
"grunt": "~0.4.4",
|
||||
"grunt-cli": "~0.1.13",
|
||||
"grunt-saucelabs": "~5.0.1",
|
||||
"grunt-saucelabs": "~5.1.1",
|
||||
"grunt-contrib-connect": "~0.7.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue