Function encodeText
Encode a given text iopipe into the desired encoding type. The resulting iopipe's element type is ubyte, with the bytes ready to be written to a storage device.
Parameters
Name | Description |
---|---|
enc | The encoding type to use. |
c | The source iopipe. Must be an iopipe where the window type's element type is text based. |
Returns
A ubyte iopipe that represents the encoded version of the input iopipe based on the provided encoding.