Closed msbmteam closed 9 months ago
The example you have sent starts with LZ4Block so I assume it is using block compression.
I think it is using this Java library https://github.com/lz4/lz4-java/blob/master/src/java/net/jpountz/lz4/LZ4BlockInputStream.java#L129
Looks like this bit here is what we need. https://github.com/lz4/lz4-java/blob/7c931bef32d179ec3d3286ee71638b23ebde3459/src/java/net/jpountz/lz4/LZ4BlockInputStream.java#L200 The java library adds header data to each block so we need to parse that before decompressing.
That works. I will hold off on releasing a new version because there is probably other things that need updating.
Bug Report
In Minecraft Java Edition 1.20.5, some additional compression schemes are being added for dedicated servers, including LZ4 (compression type 4). Amulet cannot currently decompress LZ4-compressed chunks.
Current Behaviour:
Expected behavior:
Amulet should be able to decompress chunks that were compressed with LZ4 block format.
Steps To Reproduce:
The LZ4 compression scheme is only accessible to dedicated Minecraft servers, so to reproduce this issue, you have to host a Minecraft server, not a single player world
server.properties
to have the following line:region-file-compression=lz4
Environment:
Attachments
Here are two versions of the same MCA file, but with different compression schemes: