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 LZ4 compression support #11434

Open
Hunam6 opened this issue Dec 28, 2024 · 0 comments
Open

Add LZ4 compression support #11434

Hunam6 opened this issue Dec 28, 2024 · 0 comments

Comments

@Hunam6
Copy link

Hunam6 commented Dec 28, 2024

Describe the project you are working on

I'm working on making a Minecraft client, I'm currently parsing the region files.
In order to do that I need to decompress LZ4-compressed bytes.

Describe the problem or limitation you are having in your project

Godot doesn't support this compression format/algorithm. I would like to have it supported in order to use it with the convenient utility functions Godot offers PackedByteArray.compress and PackedByteArray.decompress.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I wouldn't be able to parse LZ4-compressed maps.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

godotengine/godot#100866

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, although if we ignore usage with builtin utility functions PackedByteArray.compress, PackedByteArray.decompress and FileAccess.open_compressed, it can probably be implemented as a GDExtension.

Is there a reason why this should be core and not an add-on in the asset library?

In the gaming industry, it's used in Nintendo Switch, Unity, Hitman 3, Death Stranding, Battlefield 4, Guild Wars 2, Crytek, Black Ops 3, Black Ops Cold War, FIFA, Sine Mora and 1000 Tiny Claws. (source: https://lz4.org/#lz4usedby).

Also, PackedByteArray.compress, PackedByteArray.decompress and FileAccess.open_compressed couldn't be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants