Description
The reason I ask is because I have a transform-stream that receives objects and turns those into a bunch of buffers for each single transform. Some of these buffers I have to push out always have the same length. If possible (safe) I would like to create those buffers in my transform stream constructor and simply stick new data in during each transform.
So my question: as long as I don't call the callback in _transform, is it safe to assume _transform will not be called again? If my transform is piped down to disk for example, is there a chance that me changing the buffer in the next _transform call could have an effect on the outcome of the first write to disk?
In either case, documentation on this would be most welcome. I think stream implementers (myself in this case) often really need to squeeze out all performance, and understanding how this behaves would help. Also, as long as it's not documented one way or the other, I would be scared to depend on the behavior (even if it behaves the way I hope it does), because it may change tomorrow.