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

<NAMEADD> error when processing a large .tar.gz #1

Open
bdeboe opened this issue Mar 30, 2020 · 2 comments
Open

<NAMEADD> error when processing a large .tar.gz #1

bdeboe opened this issue Mar 30, 2020 · 2 comments

Comments

@bdeboe
Copy link

bdeboe commented Mar 30, 2020

Hi,
I'm getting errors when processing a large file, likely because it's opening a ton of %Stream.FileBinary instances in the background that each hold a handle on an actual "temporary" file, long before they may get written through a call to ExtractTo().

The %ArrayOfDataTypes interface is neat, but I think it's not very practical for large archives. A static method that just does the full process without returning a FileBinaryTar object would be just as practical for these cases. I was able to work around the issue by adding a pDest argument to ExtractStream()/ExtractFile() and copying much of the ExtractTo() code to the end of ExtractStream(), putting it instead of writing to tFile.fileData. Also needed %Save() in that case rather than just %Close(). I made too much of a mess on my way to this piece so don't have a PR right away, so maybe you'll beat me to writing this out in full ;-)

Thanks for sharing!
benjamin

@daimor
Copy link
Owner

daimor commented Mar 31, 2020

Ben, thanks for testing it, even in such a hard way with a large files.
I already have a fix for NAMEADD error, fixed in ZPM where it actually in use already.

@bdeboe
Copy link
Author

bdeboe commented Mar 31, 2020

That's funny, it's almost the exact same thing I tried (but yours is more elegant :-)). Still worth fixing here if you aren't planning to retire this repo.
Thanks!

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