Module iopipe.bufpipe

Core functionality for iopipe. Defines the base types for manipulating and processing data.

Functions

NameDescription
arrayCastPipe(c)Given a pipe chain whose window is a straight array, create a pipe chain that converts the array to another array type.
asInputRange(c)Convert an io pipe into a range, with each popFront releasing all the current data and extending a specified amount.
bufd(dev)Create a buffer to manage the data from the given source, and wrap into an iopipe.
byteSwapper(c)Swap the bytes of every element before handing to next processor. The littleEndian compile-time parameter indicates what endianness the data is in. If it matches the platform's endianness, then nothing is done (no byte swap occurs). Otherwise, a byte swap processor is returned wrapping the io pipe.
ensureElems(chain, elems)Extend a pipe until it has a minimum number of elements. If the minimum elements are already present, does nothing.
iosrc(c)Create an input source from a given Chain, and a given translation function/template.
outputPipe(c, dev)An output pipe writes all its data to a given sink stream. Any data in the output pipe's window has been written to the stream.
process(c)Process a given iopipe chain until it has reached EOF. This is accomplished by extending and releasing continuously until extend returns 0.
rbufd(dev)Create a ring buffer to manage the data from the given source, and wrap into an iopipe.

Structs

NameDescription
SimplePipeAn example processor. This demonstrates the required items for implementing an iopipe.