Skip to content

Commit

Permalink
updated to incorporate inflate error fix from SaltwaterC
Browse files Browse the repository at this point in the history
  • Loading branch information
Woodya committed Sep 30, 2011
1 parent 3a2517c commit 2c35a2d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
6 changes: 5 additions & 1 deletion bunzipstream.js
Expand Up @@ -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() {
Expand Down
6 changes: 5 additions & 1 deletion gunzipstream.js
Expand Up @@ -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() {
Expand Down
32 changes: 19 additions & 13 deletions 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"
}
}
2 changes: 1 addition & 1 deletion wscript
Expand Up @@ -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):
Expand Down

0 comments on commit 2c35a2d

Please sign in to comment.