In the specification, codecs are described like this (bytes):
Defines an array -> bytes codec that encodes arrays of fixed-size numeric
data types as a sequence of bytes in lexicographical order.
But surely this is only half the story. As the term implies, a codec has an encoding operation and an inverse decoding operation. So can this be modified like so:
Defines an array -> bytes encoder that transforms arrays of fixed-size numeric
data types as a sequence of bytes in lexicographical the order the data is stored
in the array, and a bytes -> array decoder for the inverse operation.
The strike-outs are some further comments on the bytes codec which presumably should operate on data of any type, including non-numerical data types such as logical, datetime and string. I also find the term "lexicographical order" rather vague in this context (I have not been able to find any formal definition of it in the spec) and the only practical arrangement that I can think of is that the byte stream respects the order of the data in the array.
Back to the codecs: the other codecs could similarly use a more explicit reference to encoding and decoding.
In the specification, codecs are described like this (
bytes):But surely this is only half the story. As the term implies, a codec has an encoding operation and an inverse decoding operation. So can this be modified like so:
The strike-outs are some further comments on the
bytescodec which presumably should operate on data of any type, including non-numerical data types such aslogical,datetimeandstring. I also find the term "lexicographical order" rather vague in this context (I have not been able to find any formal definition of it in the spec) and the only practical arrangement that I can think of is that the byte stream respects the order of the data in the array.Back to the codecs: the other codecs could similarly use a more explicit reference to encoding and decoding.