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

support iterative load() and dump() for file-like objects #26

Open
est opened this issue Jul 21, 2014 · 1 comment
Open

support iterative load() and dump() for file-like objects #26

est opened this issue Jul 21, 2014 · 1 comment

Comments

@est
Copy link

est commented Jul 21, 2014

Hi,

Thanks for this awesome project!

A little request to help my situiation. I have a 50MB gzip file containing 180MB text data I'd like to quickly seek() and tell() within less than 128MB running RAM.

The problem with lz4.dumps() is that you have to read all 180MB into memory in order to get lz4 compressed data.

It would be cool if this library support lz4.dump(iter_obj) so it iteratively reads data from iter_obj or any file-like object, so final lz4 compressed data could be saved into memory without having to read the full original data first.

Thanks!

@anentropic
Copy link

+1

I assume it's not just that the python interface needs to support iterator/generator objects but underlying implementation needs to support lz4 streaming format ?

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