Skip to content

Conversation

@EtlamGit
Copy link
Collaborator

@EtlamGit EtlamGit commented Dec 28, 2025

With Minecraft version 24w04a Chunks can also be compressed with LZ4 format.
Even some longer time ago it was introduced to store Chunks completely uncompressed (according Wiki since 1.15.1).

To test this feature yourself, start a new test world and edit server.properties before exploring. Chunks will then be stored according to your configuration.

This PR adds support for these storage modes:

  • detection, decoding, decompressor and checksum validation for LZ4-Java format
  • detection (and copy) of uncompressed NBT data

Furthermore the rest of the code is refactored to remove all code duplication and use the same methods for all compression methods where possible.

into own function to be called from  multiple places
other compression methods will also get such functions
@mrkite
Copy link
Owner

mrkite commented Dec 28, 2025

Wow.. good job! Of course they have to use a non-standard implementation of everything.

@EtlamGit
Copy link
Collaborator Author

That is the (former) official Java implementation of LZ4. So not really a decision from Mojang.

The code implies that nowadays you should use LZ4Frame format, but the used format is something legacy that works only for the Java version.

@EtlamGit EtlamGit marked this pull request as ready for review December 29, 2025 12:43
@mrkite mrkite merged commit e817b63 into mrkite:master Dec 29, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants