gencode icon indicating copy to clipboard operation
gencode copied to clipboard

Adding bigendian support

Open octo47 opened this issue 8 years ago • 3 comments

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.

octo47 avatar Oct 12 '16 16:10 octo47

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

andyleap avatar Oct 25 '16 03:10 andyleap

yeah, sounds good. will take a look on how that can be done.

thanks.

octo47 avatar Oct 27 '16 21:10 octo47

FYI I ported @octo47's BigEndian support PR to be more easily accessible at https://github.com/sylvainr/gencode-bigendian.

sylvainr avatar Dec 31 '20 04:12 sylvainr