expecting a buffer stream
Raynos opened this issue · comments
Jake Verbaten commented
You throw an expected a buffer stream error if an encoding was set after you have consumed the stream.
Would it be helpful to throw this error at the start aswell. i.e. check the encoding before consuming the stream.
jongleberry commented
yeah, i was thinking about that. it's more of an error check for developers so i didn't think it was necessary to check it every time, but checking at the start shouldn't hurt.
jongleberry commented
i only check in the beginning now. checking at the end would only be necessary if the user somehow sets the encoding while the stream is flowing.