Description
I recently toyed with the idea of reworking Clownfish's ByteBuf in a way similar to the immutable String changes. This would mean to use a separate class for immutable byte buffers replacing ViewByteBuf and restrict ByteBuf to creating byte buffers.
The immutable ByteBuf class could then have a companion iterator class that can be used to parse a byte buffer's content. All the NumUtils_decode_* functions could go there, for example.
The NumUtils_encode_* function could be made methods of the mutable ByteBuf.