GithubHelp home page GithubHelp logo

jahewson / node-deflate Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 1.14 MB

streaming gzip, zlib, and deflate for node.js (deprecated)

Home Page: https://github.com/jahewson/node-deflate

License: Other

C++ 69.74% Shell 0.18% JavaScript 25.57% Python 4.51%

node-deflate's Introduction

Hi there 👋

  • 🔭 I’m currently working at a Stealth Startup
  • ⚛️ I like to use React
  • 💬 Ask me about TypeScript

node-deflate's People

Contributors

jahewson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

tarruda

node-deflate's Issues

"bad deflate kind" 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?

miserable failure -- misuse?

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

Doesn't build on Centos 5.5 / node 0.4.8 / npm 1.0.6

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 directorynodejs/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

Error when installing node-deflate

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.