egorich239 / node-compress Goto Github PK
View Code? Open in Web Editor NEWThis project forked from waveto/node-compress
A streaming compression for node.js. Abandoned and unsupported as of 2011-05-29.
License: MIT License
This project forked from waveto/node-compress
A streaming compression for node.js. Abandoned and unsupported as of 2011-05-29.
License: MIT License
Take a look at https://gist.github.com/45be4bcbdea9c32457c0
Not sure what's up here.
Greetings,
I'm getting the following error when I run node-waf build
root@remote:/home/hynese/backopt/node-compress# node-waf build
Waf: Entering directory /home/hynese/backopt/node-compress/build' [1/2] cxx: src/compress.cc -> build/default/src/compress_1.o In file included from ../src/gzip.cc:33:0, from ../src/compress.cc:27: ../src/zlib.h: In constructor ‘ZipLib<Processor>::ZipLib() [with Processor = GzipImpl]’: ../src/zlib.h:207:43: instantiated from ‘static v8::Handle<v8::Value> ZipLib<Processor>::New(const v8::Arguments&) [with Processor = GzipImpl]’ ../src/zlib.h:191:5: instantiated from ‘static void ZipLib<Processor>::Initialize(v8::Handle<v8::Object>) [with Processor = GzipImpl]’ ../src/compress.cc:40:9: instantiated from here ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h: In constructor ‘ZipLib<Processor>::ZipLib() [with Processor = GunzipImpl]’: ../src/zlib.h:207:43: instantiated from ‘static v8::Handle<v8::Value> ZipLib<Processor>::New(const v8::Arguments&) [with Processor = GunzipImpl]’ ../src/zlib.h:191:5: instantiated from ‘static void ZipLib<Processor>::Initialize(v8::Handle<v8::Object>) [with Processor = GunzipImpl]’ ../src/compress.cc:41:11: instantiated from here ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h:452:7: warning: dereferencing type-punned pointer will break strict-aliasing rules ../src/zlib.h: In constructor ‘ZipLib<Processor>::Request::Request(ZipLib<Processor>*, v8::Local<v8::Value>, v8::Local<v8::Function>) [with Processor = GzipImpl, ZipLib<Processor> = ZipLib<GzipImpl>]’: ../src/zlib.h:120:67: instantiated from ‘static ZipLib<Processor>::Request* ZipLib<Processor>::Request::Write(ZipLib<Processor>::Self*, v8::Local<v8::Value>, v8::Local<v8::Function>) [with Processor = GzipImpl, ZipLib<Processor>::Request = ZipLib<GzipImpl>::Request, ZipLib<Processor>::Self = ZipLib<GzipImpl>]’ ../src/zlib.h:260:56: instantiated from ‘static v8::Handle<v8::Value> ZipLib<Processor>::Write(const v8::Arguments&) [with Processor = GzipImpl]’ ../src/zlib.h:195:5: instantiated from ‘static void ZipLib<Processor>::Initialize(v8::Handle<v8::Object>) [with Processor = GzipImpl]’ ../src/compress.cc:40:9: instantiated from here ../src/zlib.h:90:52: error: ‘class node::Buffer’ has no member named ‘data’ ../src/zlib.h:90:52: error: ‘class node::Buffer’ has no member named ‘length’ ../src/zlib.h: In constructor ‘ZipLib<Processor>::Request::Request(ZipLib<Processor>*, v8::Local<v8::Value>, v8::Local<v8::Function>) [with Processor = GunzipImpl, ZipLib<Processor> = ZipLib<GunzipImpl>]’: ../src/zlib.h:120:67: instantiated from ‘static ZipLib<Processor>::Request* ZipLib<Processor>::Request::Write(ZipLib<Processor>::Self*, v8::Local<v8::Value>, v8::Local<v8::Function>) [with Processor = GunzipImpl, ZipLib<Processor>::Request = ZipLib<GunzipImpl>::Request, ZipLib<Processor>::Self = ZipLib<GunzipImpl>]’ ../src/zlib.h:260:56: instantiated from ‘static v8::Handle<v8::Value> ZipLib<Processor>::Write(const v8::Arguments&) [with Processor = GunzipImpl]’ ../src/zlib.h:195:5: instantiated from ‘static void ZipLib<Processor>::Initialize(v8::Handle<v8::Object>) [with Processor = GunzipImpl]’ ../src/compress.cc:41:11: instantiated from here ../src/zlib.h:90:52: error: ‘class node::Buffer’ has no member named ‘data’ ../src/zlib.h:90:52: error: ‘class node::Buffer’ has no member named ‘length’ /usr/local/include/node/ev/ev.h: At global scope: /usr/local/include/node/ev/ev.h:565:1: warning: ‘ev_tstamp ev_now()’ defined but not used /usr/local/include/node/ev/ev.h:574:1: warning: ‘int ev_is_default_loop()’ defined but not used /usr/local/include/node/ev/ev.h:810:20: warning: ‘void ev_loop(int)’ defined but not used /usr/local/include/node/ev/ev.h:811:20: warning: ‘void ev_unloop(int)’ defined but not used /usr/local/include/node/ev/ev.h:812:20: warning: ‘void ev_default_destroy()’ defined but not used /usr/local/include/node/ev/ev.h:813:20: warning: ‘void ev_default_fork()’ defined but not used /usr/local/include/node/ev/ev.h:815:30: warning: ‘unsigned int ev_loop_count()’ defined but not used /usr/local/include/node/ev/ev.h:816:30: warning: ‘unsigned int ev_loop_depth()’ defined but not used /usr/local/include/node/ev/ev.h:817:30: warning: ‘void ev_loop_verify()’ defined but not used Waf: Leaving directory
/home/hynese/backopt/node-compress/build'
Build failed: -> task failed (err #1):
{task: cxx compress.cc -> compress_1.o}
I hope someone can help.
Many thanks in advance,
new compress.GzipStream()
fails with the bellow error stack on node 0.3.1. Works fine with 0.2.5. While 0.3.1 is still unstable I thought it would be a good idea to let you know about this issue.
Error: Insufficient space
at GzipStream.CommonStream (/home/chandru/.node_libraries/.npm/compress/0.1.10/package/lib/compress/index.js:105:37)
at GzipStream.CompressStream (/home/chandru/.node_libraries/.npm/compress/0.1.10/package/lib/compress/index.js:238:16)
at new GzipStream (/home/chandru/.node_libraries/.npm/compress/0.1.10/package/lib/compress/index.js:265:18)
why?
We've been using a fork of your lib (https://github.com/kkaefer/node-compress) in http://tilemill.com and seeing frequent hangs where the CPU drops from 100 % to 0%. This indicates to me a thread deadlock and I used apple's inspector (in activity monitor) to sample node when hung and it points to pthread usage in DoProcess.
npm install compress, then run demo/demo.js. The result:
$ node /usr/local/lib/node/.npm/compress/0.1.8/package/demo/demo.js
gzip created
Assertion failed: (handle->InternalFieldCount() > 0), function Unwrap, file /usr/local/include/node/node_object_wrap.h, line 29.
[1] 75099 abort node /usr/local/lib/node/.npm/compress/0.1.8/package/demo/demo.js
Hi,
Sorry about the awful issue title - I don't really know what to call the issue! I have been running node compress on my laptop for a few days whilst I have been putting something together and it had been working fine. I have also checked that it is working with the latest version of the code as of a few hours ago and its all looking good - thanks :). This has been running on my 32bit ubuntu 10.10 machine. my compiler is gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
I am however, having some issues getting compress running on my 64bit ubuntu server. I don't know for sure that it is the fact that its on a 64bit machine that is the problem, but its the only difference I can think of.
I have attempted to compile it against 0.2.4 and 0.2.3 with versions 0.1.9 and 0.1.10 (which both work on my laptop.) Now they compile fine, with the output of node-waf configure looking like:
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 /usr/local
Checking for library z : yes
'configure' finished successfully (0.133s)
I don't know if not finding the node path might be more of an issue than it makes out?
When I come to actually use the server app I have made, which decompresses an http request I get:
node: /usr/local/include/node/node_object_wrap.h:40: void
node::ObjectWrap::Wrap(v8::Handle<v8::Object>): Assertion `handle-InternalFieldCount() > 0' failed.
Aborted
This is the same with both of the versions of node-compress on both versions of node. I have been googling the problem for most of the day and I have found reference to the same problem in serveral other nodes along with rumours that something has changed slightly in the buffer interface?
Has anyone else seen/overcome this?
Thanks,
Ben
Hi Ivan,
Thanks for your awesome work. I just realized that a long-standing large file bug (no. 6) was fixed, but in the npm repo it's still Tim-Smart's old v0.1.8 package that's listed as the most recent. Can you update it or should I bug Tim-Smart instead?
Best regards,
Papandreou
When I pump a file to node-compress and pump node-compress stream to http.ServerResponse, it freezes the response when the file is large (140MB). Works fine for small files. It also works fine with a file writestream.
If I don't use node-compress at all and just pump a fs.readstream to response everything works.
Here is a piece of code which reliably reproduces this.
var http = require('http'),
fs = require('fs'),
util = require('util'),
compress = require('compress');
var s = http.createServer(function(req, res) {
var compressor = new compress.GzipStream();
res.writeHead(200, {'content-encoding': 'gzip'});
util.pump(compressor, res);
util.pump(fs.createReadStream('test.bin'), compressor);
});
s.listen(8080);
The test input file can be created with dd bs=1024 count=143360 if=/dev/zero of=test.bin
.
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.