[nodejs] node-compress improved

39 views
Skip to first unread message

Ivan Egorov

unread,
May 14, 2010, 4:37:14 PM5/14/10
to nod...@googlegroups.com
Dear all,

I'd like to introduce you an improved version of node-compress module (originally by waveto).
Major features are:
 * fixed memory leaks in original code;
 * optional bzip support;
 * streams API to (de-)compression.
Feel free to use it from git://github.com/egorich239/node-compress.git.

Regards,
Ivan.

--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

Guillermo Rauch

unread,
May 14, 2010, 4:40:17 PM5/14/10
to nod...@googlegroups.com
Couple questions:
- Is it now async? I see you have a callback, but I also see sys.puts("Compressed size : "+gzdata1.length); right after the write() call
- Do I absolutely have to pass a Buffer?

Great job, specially on the streams support.

--
Guillermo Rauch
http://devthought.com

Saikat Chakrabarti

unread,
May 14, 2010, 5:23:44 PM5/14/10
to nodejs
This looks great! I had actually fixed up some of the old node-
compress tests/added some tests to test the memory leaks/had a fix for
the memory leaks in my branch as well. At least the tests might be
useful for your branch (and I'll just switch over to using your code
now =).

http://github.com/saikat/node-compress/commits/master

Thanks!

- Saikat

On May 14, 1:40 pm, Guillermo Rauch <rau...@gmail.com> wrote:
> Couple questions:
> - Is it now async? I see you have a callback, but I also see
> sys.puts("Compressed
> size : "+gzdata1.length); right after the *write()* call
> - Do I absolutely have to pass a Buffer?
>
> Great job, specially on the streams support.
>
> --
> Guillermo Rauchhttp://devthought.com

Ivan Egorov

unread,
May 14, 2010, 11:07:40 PM5/14/10
to nod...@googlegroups.com
Guillermo,

- It's not currently sync, although this is the next thing I'm going to change after weekend;
- Using Gzip/Gunzip - yes, but this might be changed, streams API doesn't have this limitations, use setInputEncoding();

Ivan.


2010/5/15 Guillermo Rauch <rau...@gmail.com>

Ivan Egorov

unread,
May 14, 2010, 11:08:37 PM5/14/10
to nod...@googlegroups.com
FIX: It is now sync, but I'm going to change this soon.

2010/5/15 Ivan Egorov <egoric...@gmail.com>

Joran Greef

unread,
May 15, 2010, 3:50:23 AM5/15/10
to nodejs
Thanks Ivan this is great.

Ivan Egorov

unread,
Jun 5, 2010, 1:44:16 PM6/5/10
to nod...@googlegroups.com
Okay, finally I had some time to create async version now at github.

2010/5/15 Joran Greef <joran...@gmail.com>

Ivan Egorov

unread,
Jun 20, 2010, 5:48:04 AM6/20/10
to nod...@googlegroups.com
v0.1.7 released:
 - Thanks to Tim code was re-organized to be compatible with node package manager (npm).
 - Some issues with events emitting are fixed in streaming library.
 - Some demo cleanup performed.
 - Demos checked to run okay on node 0.1.98.

2010/6/5 Ivan Egorov <egoric...@gmail.com>

Ivan Egorov

unread,
Aug 3, 2010, 2:24:35 AM8/3/10
to nod...@googlegroups.com
v0.1.8 released:
  * nodejs streaming API conformance improved.
  * Removed some limitations on input/output encoding of data.
  * Checked to work on node v0.1.102.
  * Pass streams constructor arguments to implementation constructor.

2010/6/20 Ivan Egorov <egoric...@gmail.com>

Ivan Egorov

unread,
Sep 19, 2010, 9:03:14 AM9/19/10
to nod...@googlegroups.com
v0.1.9 with memory leak fixed is out.

2010/8/3 Ivan Egorov <egoric...@gmail.com>

jbaron

unread,
Sep 19, 2010, 6:26:59 PM9/19/10
to nodejs
Ivan,

Nice library and easy to use.Great piece of work!

In the last versions of Node I noticed I cannot use Buffers anymore
with node-compress. I get an exception like this:

node: /usr/local/include/node/node_object_wrap.h:29: static T*
node::ObjectWrap::Unwrap(v8::Handle<v8::Object>) [with T =
node::Buffer]: Assertion `handle->InternalFieldCount() > 0' failed.

I already rebuild node-compress, however no luck. Would you have any
idea what might cause this assertion to fail? (BTW I also noticed this
problem with native expat XML parser, so I guess it is some mistake on
my site, but I have no idea what).

TIA!!!

regards,

Peter

On Sep 19, 3:03 pm, Ivan Egorov <egorich.3...@gmail.com> wrote:
> v0.1.9 with memory leak fixed is out.
>
> 2010/8/3 Ivan Egorov <egorich.3...@gmail.com>
>
> > v0.1.8 released:
> >   * nodejs streaming API conformance improved.
> >   * Removed some limitations on input/output encoding of data.
> >   * Checked to work on node v0.1.102.
> >   * Pass streams constructor arguments to implementation constructor.
>
> > 2010/6/20 Ivan Egorov <egorich.3...@gmail.com>
>
> > v0.1.7 <http://github.com/egorich239/node-compress/tree/v0.1.7> released:
> >>  - Thanks to Tim <http://github.com/Tim-Smart> code was re-organized to
> >> be compatible with node package manager (npm).
> >>  - Some issues with events emitting are fixed in streaming library.
> >>  - Some demo cleanup performed.
> >>  - Demos checked to run okay on node 0.1.98.
>
> >> 2010/6/5 Ivan Egorov <egorich.3...@gmail.com>
>
> >> Okay, finally I had some time to create async version now at github.
>
> >>> 2010/5/15 Joran Greef <jorangr...@gmail.com>
>
> >>> Thanks Ivan this is great.
>
> >>>> --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "nodejs" group.
> >>>> To post to this group, send email to nod...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> >>>> .

Ben Noordhuis

unread,
Sep 19, 2010, 7:02:31 PM9/19/10
to nod...@googlegroups.com
On Mon, Sep 20, 2010 at 00:26, jbaron <soderbl...@gmail.com> wrote:
> In the last versions of Node I noticed I cannot use Buffers anymore
> with node-compress. I get an exception like this:
>
> node: /usr/local/include/node/node_object_wrap.h:29: static T*
> node::ObjectWrap::Unwrap(v8::Handle<v8::Object>) [with T =
> node::Buffer]: Assertion `handle->InternalFieldCount() > 0' failed.

You are not alone. :)

http://groups.google.com/group/nodejs-dev/browse_thread/thread/7da5781df8f88da6

Ivan Egorov

unread,
Sep 19, 2010, 9:30:46 PM9/19/10
to nod...@googlegroups.com
Wow, thanks for reports. Frankly speaking, I'm not a Node user, and the version set up locally on my machine is v0.2.0.
Just to be clear, do you talk about the last development version or the last minor version (0.2.2?)?

2010/9/20 Ben Noordhuis <in...@bnoordhuis.nl>
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.

Ben Noordhuis

unread,
Sep 20, 2010, 4:51:39 AM9/20/10
to nod...@googlegroups.com
On Mon, Sep 20, 2010 at 03:30, Ivan Egorov <egoric...@gmail.com> wrote:
> Just to be clear, do you talk about the last development version or the last
> minor version (0.2.2?)?

0.2.1 and up, if I'm not mistaken. The new buffer model was introduced
in branch fast-buffer, merged into the master on September 9 and the
v0.2.1 tag dates from September 10. The changelog doesn't mention it,
though.

Saikat Chakrabarti

unread,
Sep 20, 2010, 4:59:16 AM9/20/10
to nod...@googlegroups.com
Fast buffers are not being merged into the 0.2.x releases as far as I
know and are slated for 0.3.x. I think the 0.2.1 tag is on the v0.2
branch.

r...@tinyclouds.org

unread,
Sep 20, 2010, 2:20:52 PM9/20/10
to nod...@googlegroups.com
On Mon, Sep 20, 2010 at 1:51 AM, Ben Noordhuis <in...@bnoordhuis.nl> wrote:

It is not in the 0.2 releases.

master = unstable
v0.2 = stable

Ivan Egorov

unread,
Nov 10, 2010, 2:21:52 AM11/10/10
to nod...@googlegroups.com
2010-11-10 v0.1.10
  * Don't emit data events on empty buffer.
  * Debug build option in wscript.


2010/9/20 <r...@tinyclouds.org>
Reply all
Reply to author
Forward
0 new messages