Skip to content

Won's decompress #8

Open
Open
@ghost

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...

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