Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endianness support #13

Open
togrue opened this issue Aug 15, 2016 · 5 comments
Open

Add endianness support #13

togrue opened this issue Aug 15, 2016 · 5 comments

Comments

@togrue
Copy link

togrue commented Aug 15, 2016

Cerealed seems to have no support for different byte orders.
The library should clearly support both little and big endian.

@atilaneves
Copy link
Owner

Cerealed was written primarily to implement networking protocols, which are invariably big endian. Other than faster serialisation between little endian machines, what's the use case?

@togrue
Copy link
Author

togrue commented Aug 31, 2016

My particular testcase was, to read binary blocks (Type-Length-Data) out of a file and then decode the contained data into structs.

@atilaneves
Copy link
Owner

Maybe I'm biased because of my background, but I would've stored the file data in big-endian in the first place. Unless you don't control the file format?

@atrips
Copy link

atrips commented Sep 4, 2017

I used the amazing lib to implement a passive DIAMETER protocol application. Two words:"Great job!"

Example use case is IoT (Internet of Things) protocols. What I'm seeing there is a shift to little-endian (or even worst, some kind of unknown mixture : google/eddystone#138 ).
I was frustrated too because I have "traditional" network background too.

P.S.
"The library should clearly support is not bad to support both little and big endian." 👍

@atilaneves
Copy link
Owner

I've been working on little endian but it's not trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants