gencode
gencode copied to clipboard
Adding bigendian support
currently ints and floats encoded in little endian. in some cases it is preferred to have bigendian (for example for encoding keys for leveldb like databases).
here is a small patch that adds flag to generate bigendian encoding.
I can see the usefulness of this, but my issue is that it makes it an all or nothing thing. Either the whole schema is bigendian, or none of it is. I'd rather add additional types for bigendian, or some kind of modifier similar to the "framed" modifier for structs, so that it can be enabled on a "as needed" basis
yeah, sounds good. will take a look on how that can be done.
thanks.
FYI I ported @octo47's BigEndian support PR to be more easily accessible at https://github.com/sylvainr/gencode-bigendian.