Browse files

updated to incorporate inflate error fix from SaltwaterC

  • Loading branch information...
1 parent 3a2517c commit 2c35a2d325f21ca1d6707f36f6628ae369b7ff7d @Woodya committed Sep 30, 2011
Showing with 30 additions and 16 deletions.
  1. +5 −1 bunzipstream.js
  2. +5 −1 gunzipstream.js
  3. +19 −13 package.json
  4. +1 −1 wscript
View
6 bunzipstream.js
@@ -15,7 +15,11 @@ var BunzipStream = function(readStream, enc) {
self.bz.init({encoding: enc});
self.ondata = function(data) {
- var inflated = self.bz.inflate(data);
+ try {
+ var inflated = self.bz.inflate(data);
+ } catch (err) {
+ return self.onerror(err);
+ }
self.emit('data', inflated);
};
self.onclose = function() {
View
6 gunzipstream.js
@@ -15,7 +15,11 @@ var GunzipStream = function(readStream, enc) {
self.gz.init({encoding: enc});
self.ondata = function(data) {
- var inflated = self.gz.inflate(data);
+ try {
+ var inflated = self.gz.inflate(data);
+ } catch (err) {
+ return self.onerror(err);
+ }
self.emit('data', inflated);
};
self.onclose = function() {
View
32 package.json
@@ -1,24 +1,30 @@
{
"name": "gzbz2",
"description": "streaming gzip/gunzip bzip/bunzip (2) for node, requires libz/libbz2 (built on wave.to/node-compress)",
- "homepage" : "http://github.com/woodya/node-gzbz2",
- "bugs" : { "web" : "http://github.com/woodya/node-gzbz2/issues" },
- "version": "0.1.0",
- "author": { "name": "Woody Anderson", "email": "woody.anderson@gmail.com"},
- "contributors": [ "wave.to" ],
+ "homepage": "http://github.com/woodya/node-gzbz2",
+ "bugs": {
+ "url": "http://github.com/woodya/node-gzbz2/issues"
+ },
+ "version": "0.1.1",
+ "author": "Woody Anderson <woody.anderson@gmail.com>",
+ "contributors": [
+ "wave.to"
+ ],
"repository": {
"type": "git",
- "url": "http://github.com/woodya/node-gzbz2.git"
+ "url": "git://github.com/woodya/node-gzbz2.git"
},
- "engine": [ "node >=0.4.0" ],
"main": "build/default/gzbz2",
- "modules": {
- "gunzipstream": "./gunzipstream",
- "bunzipstream": "./bunzipstream"},
"directories.lib": "build/default/",
"scripts": {
- "build" : "node-waf configure build",
- "test" : "node-waf test",
- "doc" : "node-waf doc"
+ "build": "node-waf configure build",
+ "test": "node-waf test",
+ "doc": "node-waf doc",
+ "preinstall": "node-waf clean || true; node-waf configure build"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.4.0"
}
}
View
2 wscript
@@ -5,7 +5,7 @@ from os.path import lexists, exists
srcdir = '.'
blddir = 'build'
-VERSION = '0.1.0'
+VERSION = '0.1.1'
OSTYPE = platform.system()
def set_options(opt):

0 comments on commit 2c35a2d

Please sign in to comment.