Message from discussion
zlib stream.write callback
Date: Wed, 10 Oct 2012 07:34:35 -0700 (PDT)
From: khs4473 <khs4...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <459ccf4d-9bdc-4a19-bb81-6455d3a630d6@googlegroups.com>
In-Reply-To: <CADcwD-FyuF7Uu7N2KhUTG64-4CGQ=NDe=svDZNtemSRMeBHE_w@mail.gmail.com>
References: <d8618e82-a0db-45d1-8123-14bfa0436a19@googlegroups.com>
<CADcwD-EOPbzAkMcwsNDTtATEd6fih+JqgFdH0SPARiMZoVki1g@mail.gmail.com>
<bd78018d-a98f-45b6-a66a-ba40da8b4d00@googlegroups.com>
<CADcwD-EYadMv=W0nSYu3sKkz5PW8ajrqyFz9wmn+o71wz0k5pw@mail.gmail.com>
<4528c08a-ab70-42bd-be49-ba4751887f04@googlegroups.com>
<CADcwD-FyuF7Uu7N2KhUTG64-4CGQ=NDe=svDZNtemSRMeBHE_w@mail.gmail.com>
Subject: Re: [nodejs] zlib stream.write callback
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_89_32879192.1349879675403"
------=_Part_89_32879192.1349879675403
Content-Type: multipart/alternative;
boundary="----=_Part_90_26206105.1349879675403"
------=_Part_90_26206105.1349879675403
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
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
------=_Part_90_26206105.1349879675403
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
Too nice : )<div><br></div><div>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:</div><div><br></div><div> read: </div><div> fill this buffer with this many bytes, please, and call this </div><div> function when yer done (and let me know how much you </div><div> wrote).</div><div><br></div><div> write: </div><div> write this many bytes from this buffer and let me know when</div><div> you're done with said buffer.</div><div><br></div><div><br></div><div>Kevin</div>
------=_Part_90_26206105.1349879675403--
------=_Part_89_32879192.1349879675403--