Giter Club home page Giter Club logo

node-compress's People

Contributors

tim-smart avatar waveto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-compress's Issues

Build failed

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,

Node 0.3.1 compatibility

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)

Fails on OS X 10.6

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

problems compiling running on ubuntu 64bit

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

Publish v0.1.10 to the npm repo?

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

node-compress chokes HTTP response on large files

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.

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.