Skip to content

Won's decompress #8

Description

Greetings,

I have the following code:

var compress=require("./node-compress/compress");
var sys=require("sys");
//var posix=require("posix");

// Create gzip stream
var gzip=new compress.Gzip;
gzip.init();
var data="Hello world!";
sys.puts(data);
var data_deflated=gzip.deflate(data,"binary");
sys.puts(data_deflated);

var gunzip=new compress.Gunzip;
gunzip.init();
var data_inflated=gunzip.inflate(data_deflated,"binary");
sys.puts(data_inflated);

gzip.end();
gunzip.end();

I get the following output:

root@remot:/home/hynese/backopt# node gzip_test.js
Hello world!
�--compressed string---

root@remote-site:/home/hynese/backopt#

As you can see, the last line should print "Hello world!", but it's just blank...

Totally stuck now...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions