Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
zlib stream.write callback
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
khs4473  
View profile  
 More options Oct 9 2012, 3:42 pm
From: khs4473 <khs4...@gmail.com>
Date: Tue, 9 Oct 2012 12:42:36 -0700 (PDT)
Local: Tues, Oct 9 2012 3:42 pm
Subject: zlib stream.write callback

I see that zlib streams accept a callback to their write method, which will
be called when the input buffer is completely read (I'm guessing).  But I
don't see documentation of that in the API docs.  Is it safe to use this
feature?

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 9 2012, 3:58 pm
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 9 Oct 2012 12:58:21 -0700
Local: Tues, Oct 9 2012 3:58 pm
Subject: Re: [nodejs] zlib stream.write callback
No, it is going away in 0.10, with the stream API cleanup.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Oct 9 2012, 4:09 pm
From: khs4473 <khs4...@gmail.com>
Date: Tue, 9 Oct 2012 13:09:02 -0700 (PDT)
Local: Tues, Oct 9 2012 4:09 pm
Subject: Re: [nodejs] zlib stream.write callback

Cool - are new-style streams and old-style streams going to coexist in
0.10, or is everything being moved over to new-style?

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 9 2012, 4:14 pm
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 9 Oct 2012 13:14:07 -0700
Local: Tues, Oct 9 2012 4:14 pm
Subject: Re: [nodejs] zlib stream.write callback
If you add a listener on the 'data' event, or call .pause() or
.resume(), then new style streams will switch into old-style.  So,
existing programs should Just Work, but there are a bunch of new
classes that you'll be able to use to extend in userland streams so
that they play nicely with everything else.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Oct 9 2012, 9:52 pm
From: khs4473 <khs4...@gmail.com>
Date: Tue, 9 Oct 2012 18:52:24 -0700 (PDT)
Local: Tues, Oct 9 2012 9:52 pm
Subject: Re: [nodejs] zlib stream.write callback

Hmmm...

I'd like very much to have a way to determine when zlib is done with a
buffer, but without using the callback it appears to be a black hole of
sorts for whatever I put in.

I'm all for allocating like mad and using the GC to manage things, but I
would also like to have the option of micro-managing buffers if I choose.
 It's systems programming, right? : )

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 10 2012, 1:05 am
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 9 Oct 2012 22:05:34 -0700
Local: Wed, Oct 10 2012 1:05 am
Subject: Re: [nodejs] zlib stream.write callback
Ok, fair enough.  Writable stream write() callbacks landed on streams2 branch.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Oct 10 2012, 10:34 am
From: khs4473 <khs4...@gmail.com>
Date: Wed, 10 Oct 2012 07:34:35 -0700 (PDT)
Local: Wed, Oct 10 2012 10:34 am
Subject: Re: [nodejs] zlib stream.write callback

Too nice : )

I could be misguided, but I find that I gravitate toward low-level IO, like
the interface that fs provides.  The cool thing about fs (not the streams,
but the posix functions), is that I can wrap them in whatever abstraction
makes sense at the time.  I can create my own stream classes around it, or
I can make it callback-based or promise-based if I prefer.  At the lowest
level, it's pure simplicity:

    read:
      fill this buffer with this many bytes, please, and call this
      function when yer done (and let me know how much you
      wrote).

    write:
      write this many bytes from this buffer and let me know when
      you're done with said buffer.

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikeal Rogers  
View profile  
 More options Oct 10 2012, 10:38 am
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Wed, 10 Oct 2012 16:38:07 +0200
Local: Wed, Oct 10 2012 10:38 am
Subject: Re: [nodejs] zlib stream.write callback
wait, what? *all* readable streams have a write() callback now?

-Mikeal

On Oct 10, 2012, at October 10, 20127:05 AM, Isaac Schlueter <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 10 2012, 11:49 am
From: Isaac Schlueter <i...@izs.me>
Date: Wed, 10 Oct 2012 08:49:43 -0700
Local: Wed, Oct 10 2012 11:49 am
Subject: Re: [nodejs] zlib stream.write callback

No, all *writable* streams in core will, and the Writable base class will
provide it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »