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

big-endianness for size #25

Open
facboy opened this issue Jul 9, 2014 · 2 comments
Open

big-endianness for size #25

facboy opened this issue Jul 9, 2014 · 2 comments

Comments

@facboy
Copy link

facboy commented Jul 9, 2014

it would be great if you could specify in the method calls (loads and dumps) whether the size header was little endian or big endian.

@steeve
Copy link
Owner

steeve commented Jul 9, 2014

The size is always stored in little endian, to guarantee interop between archs.
See https://github.com/steeve/python-lz4/blob/master/src/python-lz4.c#L44

@facboy
Copy link
Author

facboy commented Jul 9, 2014

actually i'm reading data from a different library (hadoop as it happens), and its block compression uses a completely different scheme. basically it has the original size as a big-endian int32, followed by the compressed size as a big-endian int32, and then the compressed data. so a simple option wouldn't have worked in any case. maybe the ability to specify the size and then treat the data as merely the compressed stream?

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

2 participants