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

Add compress/decompress functions natively #3373

Open
1 task done
ffsPLASMA opened this issue Apr 27, 2024 · 2 comments
Open
1 task done

Add compress/decompress functions natively #3373

ffsPLASMA opened this issue Apr 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ffsPLASMA
Copy link

Is your feature request related to a problem? Please describe.

Add zip/archive compress and decompress functions to native level callable by lua.
Benefit of this is client can download zip/archive files from server and then extract/decompress locally.
That way you can save bandwith, especially with large files and recent IMG archive container support.

Describe the solution you'd like

callable from lua client (server as well if really needed)
compress(string filename, string compressMethod, table with additional info like format, level, dict/word size)
decompress(string filename)
both return true on success, false otherwise

Describe alternatives you've considered

Theres no real alternative unless doing it on lua itself which is very very slow and likely abort due to infinite running script.

Additional context

This would benefit large files initiated manually via downloadFile as we could significantly reduce bandwith usage.

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@ffsPLASMA ffsPLASMA added the enhancement New feature or request label Apr 27, 2024
@TracerDS
Copy link
Contributor

TracerDS commented Apr 27, 2024

Its best to replace current zip implementation with more... friendly and performant implementation.
From there exposing relevant functions is not that hard (#3057 was my attempt but there are few zip libraries that could be easily implemented into mta)

@Git-RubyCommunity
Copy link

I think it is not bad to add the ability to put a password to the arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants