multistream.codec.bin
Example binary codec which simply encodes and decodes raw byte arrays.
This codec is probably not going to be very useful in practice; if you’re working with raw bytes, you should just work with InputStream
and OutputStream
directly.
bin-codec
(bin-codec & {:as opts})
Creates a new binary codec. A number may be given to specify the buffer size in bytes for decoding operations.
BinaryData
protocol
Protocol for values which can be encoded directly as a binary sequence.
members
write-bytes!
(write-bytes! data output)
Writes the binary data to the given output stream. Returns the number of bytes written.