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

file.Decompress #1884

Open
aStonedPenguin opened this issue Jul 5, 2021 · 4 comments
Open

file.Decompress #1884

aStonedPenguin opened this issue Jul 5, 2021 · 4 comments

Comments

@aStonedPenguin
Copy link

Details

A function to decompress a file.

local success = file.Decompress( inFile, outFile )

This current situation where you have to read the file, pass it to util.Decompress and write it again is extremely slow and prone to maxing the games memory when working with larger files.

@thegrb93
Copy link

thegrb93 commented Jul 5, 2021

It will take just as long for this function to execute unless you are also requesting it to be asynchronous. Either way, it's kind of a niche request.

@aStonedPenguin
Copy link
Author

It will take just as long for this function to execute unless you are also requesting it to be asynchronous. Either way, it's kind of a niche request.

Loading the compressed and then the decompressed file into memory is definitely slower than doing it properly in C++. But that's not the main issue, memory usage is.

Besides everything needed to add this is already there.

@WilliamVenner
Copy link

Would be cool if we could get file.WriteCompressed for the same reason. In that case we should probably name the function file.ReadCompressed instead of file.Decompress. The naming of file.Decompress actually implies that it will modify the file.

@Velkon
Copy link

Velkon commented Oct 26, 2021

This would be very useful please add

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

4 participants