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

How can I use LZMA-JS for big file? #18

Open
zheung opened this issue Jun 2, 2015 · 4 comments
Open

How can I use LZMA-JS for big file? #18

zheung opened this issue Jun 2, 2015 · 4 comments

Comments

@zheung
Copy link
Contributor

zheung commented Jun 2, 2015

I use LZMA-JS for node.

But I can't find any way to compress big file.
Help me please and thanks!

If I load big file as Buffer, it always shows me 'out of memory'.
Have any way to use node's Stream on LZMA-JS?

@jhg
Copy link

jhg commented Jun 2, 2015

The error out of memory sound as you need for big file more memory and don't has more memory, I show code of LZMA-c.js and compress method need a str parameter, need all in memory. For your case I think that LZMA-JS need a object for compress in stream, and not load all file in memory only read, for example for each 1024B a call to compress and keep window for next call. And same in decompress. It is possible but not is implemented now.

@nmrugg
Copy link
Collaborator

nmrugg commented Jun 2, 2015 via email

@jhg
Copy link

jhg commented Jun 2, 2015

@nmrugg as it is not in your todo list and stream support is important but not critical, I can read code of lzma-c and lzma-d for try patch it (on weekends) and then fix #12 and this. I think that I can in a 1-2 days read code and understand good for change it, and changes I think I can write in 1 day (1-2 weekends).

@nmrugg
Copy link
Collaborator

nmrugg commented Jun 6, 2015

That would be great, @jhg! Let me know if you have any questions.

@addaleax addaleax mentioned this issue Oct 28, 2015
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