Repository navigation
v0.8.6: bunpy.node.stream -- in-memory stream shim
v0.8.6 — bunpy.node.stream: in-memory stream shim
Adds bunpy.node.stream — Node.js stream module shim (in-memory, synchronous).
New
stream.Readable()— in-memory Readable with push/read/pipestream.Writable()— in-memory Writable with write/end/getContentsstream.PassThrough()— pass-through transform with write/read/pipestream.Transform()— alias for PassThrough
Notes
Streams are in-memory and synchronous — no async event loop required.
pipe() transfers buffered data to the destination Writable synchronously.
Usage
import bunpy.node.stream as stream
w = stream.Writable()
w.write("chunk1")
w.write("chunk2")
data = w.getContents()