Is there a way to construct a transform pipe such that it can receive 
multiple chunks before calling everything back?

It would be something like the following:
_transform = function(chunk,encoding,done) {
       callExternalProcess(chunk,function(data) {
              this.push(data);
              done();
       }
}

The "callExternalProcess" function may accumulate multiple chunks of data 
before returning all back together. Thus, for 3 calls to _transform, there 
would only be one call back to done(). (This would actually be processed 
outside of node, so there is likely not a way to know which return chunk 
goes with which source chunk.

What are the implications of structuring it with a generic callback?

_transform = function(chunk,encoding,done) {
       callExternalProcess(chunk,function(data) {
              this.push(data);
        }
                    done();

}
_flush = function() {
    // make sure everything is done.
}

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to