From 8c2efe2fdafb06023f7b159652b2929293171790 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 8 Apr 2011 13:10:10 +0700 Subject: [PATCH 1/9] use second optional argument as deflate/inflate dictionary --- package.json | 2 +- src/node-zlib.cc | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 97b7df5..7ef0d91 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zlib", "description": "Simple, synchronous deflate/inflate for buffers", - "version": "1.0.3", + "version": "1.0.4", "homepage": "https://github.com/kkaefer/node-zlib", "author": "Konstantin Käfer ", "repository": { diff --git a/src/node-zlib.cc b/src/node-zlib.cc index b2c7e14..91b1046 100644 --- a/src/node-zlib.cc +++ b/src/node-zlib.cc @@ -29,7 +29,6 @@ using namespace node; } #endif - z_stream deflate_s; z_stream inflate_s; @@ -51,6 +50,18 @@ Handle ZLib_##x##flate(const Arguments& args) { \ } \ \ Local input = args[0]->ToObject(); \ + \ + bool hasDict = false; \ + Local dict; \ + Bytef* bdict; \ + int dictLen; \ + if (args.Length() >= 2 && Buffer::HasInstance(args[1])) { \ + dict = args[1]->ToObject(); \ + bdict = (Bytef*)Buffer_Data(dict); \ + dictLen = Buffer_Length(dict); \ + hasDict = true; \ + } \ + \ x##flate_s.next_in = (Bytef*)Buffer_Data(input); \ int length = x##flate_s.avail_in = Buffer_Length(input); \ \ @@ -65,10 +76,26 @@ Handle ZLib_##x##flate(const Arguments& args) { \ x##flate_s.avail_out = factor * length; \ x##flate_s.next_out = (Bytef*)result + compressed; \ \ - ret = x##flate(&x##flate_s, Z_FINISH); \ + ret = x##flate(&x##flate_s, Z_SYNC_FLUSH); \ + \ + if (Z_NEED_DICT) { \ + if (!hasDict) { \ + free(result); \ + return ZLib_error("Dictionary is required"); \ + } \ + ret = x##flateSetDictionary(&x##flate_s, bdict, \ + dictLen); \ + \ + if (ret != Z_OK) { \ + return ZLib_error("Failed to set dictionary"); \ + } \ + \ + ret = x##flate(&x##flate_s, Z_SYNC_FLUSH); \ + } \ + \ if (ret != Z_STREAM_END && ret != Z_OK && ret != Z_BUF_ERROR) { \ - free(result); \ - return ZLib_error(x##flate_s.msg); \ + free(result); \ + return ZLib_error(x##flate_s.msg); \ } \ \ compressed += (factor * length - x##flate_s.avail_out); \ From c552760c16f5257c57d48143ba40d4ec102a8106 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 8 Apr 2011 15:46:04 +0700 Subject: [PATCH 2/9] compression dictionary for deflate too, fix Z_NEED_DICT check --- src/node-zlib.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/node-zlib.cc b/src/node-zlib.cc index 91b1046..927670c 100644 --- a/src/node-zlib.cc +++ b/src/node-zlib.cc @@ -62,10 +62,19 @@ Handle ZLib_##x##flate(const Arguments& args) { \ hasDict = true; \ } \ \ + int ret; \ + if (factor == 1 && hasDict) { \ + ret = x##flateSetDictionary(&x##flate_s, bdict, dictLen); \ + \ + if (ret != Z_OK) { \ + return ZLib_error("Failed to set dictionary!"); \ + } \ + \ + } \ + \ x##flate_s.next_in = (Bytef*)Buffer_Data(input); \ int length = x##flate_s.avail_in = Buffer_Length(input); \ \ - int ret; \ char* result = NULL; \ \ int compressed = 0; \ @@ -78,7 +87,7 @@ Handle ZLib_##x##flate(const Arguments& args) { \ \ ret = x##flate(&x##flate_s, Z_SYNC_FLUSH); \ \ - if (Z_NEED_DICT) { \ + if (ret == Z_NEED_DICT) { \ if (!hasDict) { \ free(result); \ return ZLib_error("Dictionary is required"); \ From 301dbcc21471ba9b82ad284370c6558948385190 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 9 Apr 2011 02:55:56 +0700 Subject: [PATCH 3/9] full refactor, using ZLibContext --- .gitignore | 3 +- src/node-zlib.cc | 131 -------------------------------------- src/node_zlib.cc | 146 +++++++++++++++++++++++++++++++++++++++++++ src/node_zlib.h | 58 +++++++++++++++++ test/deflate.test.js | 2 +- test/inflate.test.js | 2 +- wscript | 5 +- 7 files changed, 211 insertions(+), 136 deletions(-) delete mode 100644 src/node-zlib.cc create mode 100644 src/node_zlib.cc create mode 100644 src/node_zlib.h diff --git a/.gitignore b/.gitignore index 0058b67..73b6cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build -.lock-wscript \ No newline at end of file +lib/*.node +.lock-wscript diff --git a/src/node-zlib.cc b/src/node-zlib.cc deleted file mode 100644 index 927670c..0000000 --- a/src/node-zlib.cc +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include - -using namespace v8; -using namespace node; - -// node v0.2.x compatibility -#if NODE_VERSION_AT_LEAST(0,3,0) - #define Buffer_Data Buffer::Data - #define Buffer_Length Buffer::Length - #define Buffer_New Buffer::New -#else - inline char* Buffer_Data(Handle obj) { - return (ObjectWrap::Unwrap(obj))->data(); - } - inline size_t Buffer_Length(Handle obj) { - return (ObjectWrap::Unwrap(obj))->length(); - } - inline Buffer* Buffer_New(char* data, size_t length) { - Buffer* buffer = Buffer::New(length); - memcpy(buffer->data(), data, length); - return buffer; - } -#endif - -z_stream deflate_s; -z_stream inflate_s; - -inline Handle ZLib_error(const char* msg = NULL) { - return ThrowException(Exception::Error( - String::New(msg ? msg : "Unknown Error"))); -} - -#define ZLib_Xflate(x, factor) \ -Handle ZLib_##x##flate(const Arguments& args) { \ - HandleScope scope; \ - \ - if (args.Length() < 1 || !Buffer::HasInstance(args[0])) { \ - return ZLib_error("Expected Buffer as first argument"); \ - } \ - \ - if ((x##flateReset(&x##flate_s)) != Z_OK) { \ - assert((false, "ZLib stream is beyond repair")); \ - } \ - \ - Local input = args[0]->ToObject(); \ - \ - bool hasDict = false; \ - Local dict; \ - Bytef* bdict; \ - int dictLen; \ - if (args.Length() >= 2 && Buffer::HasInstance(args[1])) { \ - dict = args[1]->ToObject(); \ - bdict = (Bytef*)Buffer_Data(dict); \ - dictLen = Buffer_Length(dict); \ - hasDict = true; \ - } \ - \ - int ret; \ - if (factor == 1 && hasDict) { \ - ret = x##flateSetDictionary(&x##flate_s, bdict, dictLen); \ - \ - if (ret != Z_OK) { \ - return ZLib_error("Failed to set dictionary!"); \ - } \ - \ - } \ - \ - x##flate_s.next_in = (Bytef*)Buffer_Data(input); \ - int length = x##flate_s.avail_in = Buffer_Length(input); \ - \ - char* result = NULL; \ - \ - int compressed = 0; \ - do { \ - result = (char*)realloc(result, compressed + factor * length); \ - if (!result) return ZLib_error("Could not allocate memory"); \ - \ - x##flate_s.avail_out = factor * length; \ - x##flate_s.next_out = (Bytef*)result + compressed; \ - \ - ret = x##flate(&x##flate_s, Z_SYNC_FLUSH); \ - \ - if (ret == Z_NEED_DICT) { \ - if (!hasDict) { \ - free(result); \ - return ZLib_error("Dictionary is required"); \ - } \ - ret = x##flateSetDictionary(&x##flate_s, bdict, \ - dictLen); \ - \ - if (ret != Z_OK) { \ - return ZLib_error("Failed to set dictionary"); \ - } \ - \ - ret = x##flate(&x##flate_s, Z_SYNC_FLUSH); \ - } \ - \ - if (ret != Z_STREAM_END && ret != Z_OK && ret != Z_BUF_ERROR) { \ - free(result); \ - return ZLib_error(x##flate_s.msg); \ - } \ - \ - compressed += (factor * length - x##flate_s.avail_out); \ - } while (x##flate_s.avail_out == 0); \ - \ - Buffer* output = Buffer_New(result, compressed); \ - free(result); \ - return scope.Close(Local::New(output->handle_)); \ -} - -ZLib_Xflate(de, 1); -ZLib_Xflate(in, 2); - -extern "C" void init (Handle target) { - deflate_s.zalloc = inflate_s.zalloc = Z_NULL; - deflate_s.zfree = inflate_s.zfree = Z_NULL; - deflate_s.opaque = inflate_s.opaque = Z_NULL; - - deflateInit(&deflate_s, Z_DEFAULT_COMPRESSION); - inflateInit(&inflate_s); - - NODE_SET_METHOD(target, "deflate", ZLib_deflate); - NODE_SET_METHOD(target, "inflate", ZLib_inflate); -} diff --git a/src/node_zlib.cc b/src/node_zlib.cc new file mode 100644 index 0000000..c66070f --- /dev/null +++ b/src/node_zlib.cc @@ -0,0 +1,146 @@ +#include +#include +#include + +#include +#include +#include + +#include "node_zlib.h" + +using namespace v8; +using namespace node; + +Persistent ZLibContext::constructor_template; + +void ZLibContext::Initialize(Handle target) { + Local t = FunctionTemplate::New(ZLibContext::New); + constructor_template = Persistent::New(t); + constructor_template->InstanceTemplate()->SetInternalFieldCount(1); + constructor_template->SetClassName(String::NewSymbol("ZLibContext")); + + // Instance methods + NODE_SET_PROTOTYPE_METHOD(constructor_template, "deflate", + ZLibContext::Deflate); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "inflate", + ZLibContext::Inflate); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "resetDeflate", + ZLibContext::ResetDeflate); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "resetInflate", + ZLibContext::ResetInflate); + + target->Set(String::NewSymbol("ZLibContext"), constructor_template->GetFunction()); +}; + +Handle ZLibContext::New(const Arguments &args) { + if (!args.IsConstructCall()) { + return FromConstructorTemplate(constructor_template, args); + } + + HandleScope scope; + + ZLibContext *z = new ZLibContext(); + z->Wrap(args.This()); + + // First argument can be initial dictionary + if (args.Length() >= 1 && Buffer::HasInstance(args[0])) { + Local dict = args[0]->ToObject(); + z->pdict = Persistent::New(dict); + z->bdict = (Bytef*)Buffer::Data(dict); + z->dictLen = Buffer::Length(dict); + z->hasDict = true; + } + + return args.This(); +}; + +inline Handle ZLib_error(const char* msg = NULL) { + return ThrowException(Exception::Error( + String::New(msg ? msg : "Unknown Error"))); +}; + +#define ZLib_Xreset(Method, method) \ +Handle ZLibContext::Reset##Method(const Arguments& args) { \ + HandleScope scope; \ + ZLibContext *z = ObjectWrap::Unwrap(args.This()); \ + \ + if (method##Reset(&(z->method##_s)) != Z_OK) { \ + return ZLib_error("ZLib stream is beyond repair"); \ + } \ + \ + z->dictSet = false; \ + return scope.Close(Boolean::New(true)); \ +} + +#define ZLib_Xflate(Method, method, factor) \ +Handle ZLibContext::Method(const Arguments& args) { \ + HandleScope scope; \ + \ + if (args.Length() < 1 || !Buffer::HasInstance(args[0])) { \ + return ZLib_error("Expected Buffer as first argument"); \ + } \ + \ + Local input = args[0]->ToObject(); \ + \ + ZLibContext *z = ObjectWrap::Unwrap(args.This()); \ + \ + int ret; \ + if (factor == 1 && z->hasDict && !z->dictSet) { \ + ret = method##SetDictionary(&(z->method##_s), z->bdict, z->dictLen); \ + \ + if (ret != Z_OK) { \ + return ZLib_error("Failed to set dictionary!"); \ + } \ + \ + z->dictSet = true; \ + } \ + \ + z->method##_s.next_in = (Bytef*)Buffer::Data(input); \ + int length = z->method##_s.avail_in = Buffer::Length(input); \ + \ + char* result = NULL; \ + \ + int compressed = 0; \ + do { \ + result = (char*)realloc(result, compressed + factor * length); \ + if (!result) return ZLib_error("Could not allocate memory"); \ + \ + z->method##_s.avail_out = factor * length; \ + z->method##_s.next_out = (Bytef*)result + compressed; \ + \ + ret = method(&(z->method##_s), Z_SYNC_FLUSH); \ + \ + if (ret == Z_NEED_DICT) { \ + if (!z->hasDict) { \ + free(result); \ + return ZLib_error("Dictionary is required"); \ + } \ + ret = method##SetDictionary(&(z->method##_s), z->bdict, \ + z->dictLen); \ + \ + if (ret != Z_OK) { \ + return ZLib_error("Failed to set dictionary"); \ + } \ + \ + ret = method(&(z->method##_s), Z_SYNC_FLUSH); \ + } \ + \ + if (ret != Z_STREAM_END && ret != Z_OK && ret != Z_BUF_ERROR) { \ + free(result); \ + return ZLib_error(z->method##_s.msg); \ + } \ + \ + compressed += (factor * length - z->method##_s.avail_out); \ + } while (z->method##_s.avail_out == 0); \ + \ + Buffer* output = Buffer::New(result, compressed); \ + free(result); \ + return scope.Close(Local::New(output->handle_)); \ +} + +ZLib_Xflate(Deflate, deflate, 1); +ZLib_Xflate(Inflate, inflate, 2); +ZLib_Xreset(Deflate, deflate); +ZLib_Xreset(Inflate, inflate); + +NODE_MODULE(zlib_bindings, ZLibContext::Initialize); diff --git a/src/node_zlib.h b/src/node_zlib.h new file mode 100644 index 0000000..4195c63 --- /dev/null +++ b/src/node_zlib.h @@ -0,0 +1,58 @@ +/** + * ZLib binding for node.js + */ +#ifndef NODE_ZLIB_H +#define NODE_ZLIB_H + +#include +#include +#include + +#include + +using namespace node; +using namespace v8; + +class ZLibContext : public ObjectWrap { + public: + + static void Initialize(Handle target); + + static Persistent constructor_template; + + protected: + ZLibContext() : ObjectWrap(), deflate_s(), inflate_s() { + deflate_s.zalloc = inflate_s.zalloc = Z_NULL; + deflate_s.zfree = inflate_s.zfree = Z_NULL; + deflate_s.opaque = inflate_s.opaque = Z_NULL; + + deflateInit(&deflate_s, Z_DEFAULT_COMPRESSION); + inflateInit(&inflate_s); + + dictSet = hasDict = false; + dictLen = 0; + } + + ~ZLibContext() { } + + + static Handle New(const Arguments &args); + + static Handle Deflate(const Arguments &args); + static Handle Inflate(const Arguments &args); + + static Handle ResetDeflate(const Arguments &args); + static Handle ResetInflate(const Arguments &args); + + z_stream deflate_s; + z_stream inflate_s; + + bool hasDict; + bool dictSet; + int dictLen; + Bytef* bdict; + Persistent pdict; + +}; + +#endif // NODE_ZLIB_H diff --git a/test/deflate.test.js b/test/deflate.test.js index c27b7ec..61c4b18 100644 --- a/test/deflate.test.js +++ b/test/deflate.test.js @@ -1,6 +1,6 @@ var assert = require('assert'); var Buffer = require('buffer').Buffer; -var zlib = require('../lib/zlib'); +var zlib = require('../lib/zlib').ZLibContext(); exports['test deflate/inflate buffer'] = function(beforeExit) { var input = new Buffer('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'); diff --git a/test/inflate.test.js b/test/inflate.test.js index c35b3f5..96e1770 100644 --- a/test/inflate.test.js +++ b/test/inflate.test.js @@ -1,6 +1,6 @@ var assert = require('assert'); var Buffer = require('buffer').Buffer; -var zlib = require('../lib/zlib'); +var zlib = require('../lib/zlib').ZLibContext(); exports['test inflate fail'] = function(beforeExit) { var compressed = new Buffer('\x78\x80\x9c\xab\x56\x4a\x93\xaf\x46\x00\x1b\xa9\x02\x77\x92\x0f', 'binary'); diff --git a/wscript b/wscript index a07dbcb..9d57cd2 100644 --- a/wscript +++ b/wscript @@ -20,7 +20,8 @@ def build(bld): obj = bld.new_task_gen("cxx", "shlib", "node_addon") obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"] obj.target = TARGET - obj.source = "src/node-zlib.cc" + obj.source = "src/node_zlib.cc" + obj.includes = "src/" obj.uselib = "ZLIB" def shutdown(): @@ -29,4 +30,4 @@ def shutdown(): unlink(TARGET_FILE) else: if exists(built): - copy(built, dest) \ No newline at end of file + copy(built, dest) From 2c8c605d6fc4d0f42480464fc7e0d8eee6ce803c Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 22 Apr 2011 22:43:22 +0700 Subject: [PATCH 4/9] (bump) version, fix installation --- package.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7ef0d91..6d556dd 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,24 @@ { - "name": "zlib", - "description": "Simple, synchronous deflate/inflate for buffers", - "version": "1.0.4", + "name": "zlibcontext", + "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", + "version": "1.0.5", "homepage": "https://github.com/kkaefer/node-zlib", - "author": "Konstantin Käfer ", + "author": "Fedor Indutny ", + "contributors": [ + "Konstantin Käfer " + ], "repository": { "type": "git", "url": "git://github.com/kkaefer/node-zlib.git" }, "engines": { - "node": ">=0.2.0" + "node": ">=0.4.0" }, "licenses": [ { "type": "BSD" } ], + "scripts": { + "install": "./configure && make" + }, "main": "./lib/zlib" } From 2e9489cd44996f4839d0fd88acfa30a371fb78cb Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 23 Apr 2011 05:04:11 +0700 Subject: [PATCH 5/9] (bump) version, npmignore --- .npmignore | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..73b6cf5 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +build +lib/*.node +.lock-wscript diff --git a/package.json b/package.json index 6d556dd..02e85e5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zlibcontext", "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", - "version": "1.0.5", + "version": "1.0.6", "homepage": "https://github.com/kkaefer/node-zlib", "author": "Fedor Indutny ", "contributors": [ From 9f5d01caf320d30d5ab0557cbf86f0047568b638 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 25 Apr 2011 02:19:11 +0700 Subject: [PATCH 6/9] (bump) version, removed 64bit dependency --- package.json | 2 +- wscript | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 02e85e5..4a2067c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zlibcontext", "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", - "version": "1.0.6", + "version": "1.0.7", "homepage": "https://github.com/kkaefer/node-zlib", "author": "Fedor Indutny ", "contributors": [ diff --git a/wscript b/wscript index 9d57cd2..50372bd 100644 --- a/wscript +++ b/wscript @@ -18,7 +18,7 @@ def configure(conf): def build(bld): obj = bld.new_task_gen("cxx", "shlib", "node_addon") - obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"] + obj.cxxflags = ["-g", "-D_LARGEFILE_SOURCE", "-Wall"] obj.target = TARGET obj.source = "src/node_zlib.cc" obj.includes = "src/" From 3b72f7fead0253448a44e2413d867c59d8b63a6e Mon Sep 17 00:00:00 2001 From: Chris Strom Date: Sun, 6 Nov 2011 10:48:00 -0500 Subject: [PATCH 7/9] Update build location to build/Release It looks to have changed in node 0.6. --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index 50372bd..81cea21 100644 --- a/wscript +++ b/wscript @@ -4,7 +4,7 @@ from shutil import copy2 as copy TARGET = 'zlib_bindings' TARGET_FILE = '%s.node' % TARGET -built = 'build/default/%s' % TARGET_FILE +built = 'build/Release/%s' % TARGET_FILE dest = 'lib/%s' % TARGET_FILE def set_options(opt): From cbe49779b23dbe02d89dc658932357c8375d57c5 Mon Sep 17 00:00:00 2001 From: Chris Strom Date: Sun, 6 Nov 2011 10:50:54 -0500 Subject: [PATCH 8/9] Bump version and node dependency. Need a new release of zlibcontext to npm. For better or worse, this is effectively a node 0.6.0 library now. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4a2067c..203b94a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zlibcontext", "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", - "version": "1.0.7", + "version": "1.0.8", "homepage": "https://github.com/kkaefer/node-zlib", "author": "Fedor Indutny ", "contributors": [ @@ -12,7 +12,7 @@ "url": "git://github.com/kkaefer/node-zlib.git" }, "engines": { - "node": ">=0.4.0" + "node": ">=0.6.0" }, "licenses": [ { "type": "BSD" } From ed598260b234a047ae6b24a959048b11e0fc8424 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 7 Nov 2011 00:23:47 +0600 Subject: [PATCH 9/9] 1.0.9 --- package.json | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 203b94a..b290e0c 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,28 @@ { - "name": "zlibcontext", - "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", - "version": "1.0.8", - "homepage": "https://github.com/kkaefer/node-zlib", - "author": "Fedor Indutny ", - "contributors": [ - "Konstantin Käfer " - ], - "repository": { - "type": "git", - "url": "git://github.com/kkaefer/node-zlib.git" - }, - "engines": { - "node": ">=0.6.0" - }, - "licenses": [ - { "type": "BSD" } - ], - "scripts": { - "install": "./configure && make" - }, - "main": "./lib/zlib" -} + "name": "zlibcontext", + "description": "Simple, synchronous deflate/inflate for buffers (ZLibContext modification)", + "version": "1.0.9", + "homepage": "https://github.com/kkaefer/node-zlib", + "author": "Fedor Indutny ", + "contributors": [ + "Konstantin Käfer " + ], + "repository": { + "type": "git", + "url": "git://github.com/kkaefer/node-zlib.git" + }, + "engines": { + "node": ">=0.6.0" + }, + "licenses": [ + { + "type": "BSD" + } + ], + "scripts": { + "install": "./configure && make" + }, + "main": "./lib/zlib", + "dependencies": {}, + "devDependencies": {} +} \ No newline at end of file