FAQ
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.
On Tue, Oct 9, 2012 at 1:09 PM, khs4473 wrote:
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
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Khs4473 at Oct 9, 2012 at 8:43 pm
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Isaac Schlueter at Oct 9, 2012 at 9:05 pm
    No, it is going away in 0.10, with the stream API cleanup.

    On Tue, Oct 9, 2012 at 12:42 PM, khs4473 wrote:
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Khs4473 at Oct 9, 2012 at 9:15 pm
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Khs4473 at Oct 10, 2012 at 1:52 am
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Isaac Schlueter at Oct 10, 2012 at 5:13 am
    Ok, fair enough. Writable stream write() callbacks landed on streams2 branch.
    On Tue, Oct 9, 2012 at 6:52 PM, khs4473 wrote:
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mikeal Rogers at Oct 10, 2012 at 3:33 pm
    wait, what? *all* readable streams have a write() callback now?

    -Mikeal
    On Oct 10, 2012, at October 10, 20127:05 AM, Isaac Schlueter wrote:

    Ok, fair enough. Writable stream write() callbacks landed on streams2 branch.
    On Tue, Oct 9, 2012 at 6:52 PM, khs4473 wrote:
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Isaac Schlueter at Oct 10, 2012 at 4:12 pm
    No, all *writable* streams in core will, and the Writable base class will
    provide it.
    On Wednesday, October 10, 2012, Mikeal Rogers wrote:

    wait, what? *all* readable streams have a write() callback now?

    -Mikeal
    On Oct 10, 2012, at October 10, 20127:05 AM, Isaac Schlueter wrote:

    Ok, fair enough. Writable stream write() callbacks landed on streams2
    branch.
    On Tue, Oct 9, 2012 at 6:52 PM, khs4473 wrote:
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com<javascript:;>
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com <javascript:;>
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com<javascript:;>
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com <javascript:;>
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com<javascript:;>
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com <javascript:;>
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Khs4473 at Oct 10, 2012 at 4:15 pm
    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

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedOct 9, '12 at 8:14p
activeOct 10, '12 at 4:15p
posts9
users3
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase