jahewson / node-deflate Goto Github PK
View Code? Open in Web Editor NEWstreaming gzip, zlib, and deflate for node.js (deprecated)
Home Page: https://github.com/jahewson/node-deflate
License: Other
streaming gzip, zlib, and deflate for node.js (deprecated)
Home Page: https://github.com/jahewson/node-deflate
License: Other
deflate should just silently convert strings to buffers (or at least throw a more useful error).
Having trouble installing node-deflate as a dependency of bogart:
npm ERR! error installing [email protected] Error: [email protected] install: ./build.sh
npm ERR! error installing [email protected] sh "-c" "./build.sh"
failed with 1
npm ERR! error installing [email protected] at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected] at ChildProcess.onexit (child_process.js:192:12)
npm ERR! [email protected] install: ./build.sh
npm ERR! sh "-c" "./build.sh"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the deflate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./build.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls deflate
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.35.4-rscloud
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /var/www/shaf/node_modules/bogart
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.30
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/shaf/node_modules/bogart/npm-debug.log
npm not ok
Any ideas?
Trying to install via npm:
$] npm install deflate
[email protected] install nodejs/director/node_modules/deflate
./build.sh
Setting srcdir to : nodejs/director/node_modules/deflate
Setting blddir to : nodejs/director/node_modules/deflate/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /home/jules
Checking for library z : yes
'configure' finished successfully (0.525s)
Waf: Entering directory nodejs/director/node_modules/deflate/build' [1/2] cxx: src/deflate.cc -> build/default/src/deflate_1.o ../src/deflate.cc:591:2: warning: no newline at end of file ../src/deflate.cc: In static member function ‘static v8::Handle<v8::Value> Flater::SetInput(const v8::Arguments&)’: ../src/deflate.cc:218: error: ‘realloc’ was not declared in this scope ../src/deflate.cc:231: error: ‘malloc’ was not declared in this scope ../src/deflate.cc: In static member function ‘static v8::Handle<v8::Value> Flater::GetOutput(const v8::Arguments&)’: ../src/deflate.cc:339: error: ‘free’ was not declared in this scope ../src/deflate.cc: In function ‘v8::Handle<v8::Value> OnePassDeflate(const v8::Arguments&)’: ../src/deflate.cc:439: error: ‘malloc’ was not declared in this scope ../src/deflate.cc:460: error: ‘free’ was not declared in this scope ../src/deflate.cc: In function ‘v8::Handle<v8::Value> OnePassInflate(const v8::Arguments&)’: ../src/deflate.cc:531: error: ‘malloc’ was not declared in this scope ../src/deflate.cc:546: error: ‘realloc’ was not declared in this scope ../src/deflate.cc:568: error: ‘free’ was not declared in this scope Waf: Leaving directory
nodejs/director/node_modules/deflate/build'
Build failed: -> task failed (err #1):
{task: cxx deflate.cc -> deflate_1.o}
npm ERR! error installing [email protected] Error: [email protected] install: ./build.sh
npm ERR! error installing [email protected] sh "-c" "./build.sh"
failed with 1
npm ERR! error installing [email protected] at ChildProcess. (/home/jules/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected] at ChildProcess.onexit (child_process.js:192:12)
npm ERR! [email protected] install: ./build.sh
npm ERR! sh "-c" "./build.sh"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the deflate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./build.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls deflate
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.18-194.32.1.el5
npm ERR! command "node" "/home/jules/bin/npm" "install" "deflate"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! nodejs/director/npm-debug.log
npm not ok
var _write = res.write; // save the original write function
res.write = function(data) { // define a new write function
var dd = deflate.inflateSync(data); // deflate?
_write.call(res, data); // call the original write function
};
node(1618) malloc: *** mmap(size=140737488355328) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
[2011-11-18 13:08:20.007] [ERROR] console - res.write error: Z_MEM_ERROR
[2011-11-18 13:08:20.008] [ERROR] console - res.write error: Z_DATA_ERROR
Hello! Can't use node-deflate. Trying to use this code:
var Deflate = require('deflate'); Deflate.deflate(new Buffer([255, 255, 255, 251]), 'deflate');
But it fails with error "bad deflate kind".
I were trying to find out what's the matter, so I suppose it's in the line 378 in deflate.cc:
char* strLevel = *String::AsciiValue(args[idx+0]->ToString());
I think so, because there is a value in args[idx+0]
, but strLevel
is empty (or may be pointer is NULL).
As far as I've got it from the description of String::AsciiValue() (http://bespin.cz/~ondras/html/classv8_1_1String_1_1AsciiValue.html), "conversion to a string fails" and * String::AsciiValue() returns NULL.
Could you please tell me what the problem could it be?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.