Named Binary Tag (NBT) library for Java based on Graham Edgecombe's JNBT library. NBT is a tag based binary format designed to carry large amounts of binary data with smaller amounts of additional data.
The NBTi/oStreams only provide a boolean flag to tell if the stream is compressed or not. In reality, there are three possible compressions: none, gzip or zlib. The latter one is heavily used to store Chunk NBT data in Minecraft.
This commit introduces three constants for the compression. They happen to be matching the ID convention used by Minecraft. This way, no additional case checking is required to handle the stream compression when reading region files.
The old methods using a boolean are marked as deprecated from now on, since they are ambiguous about which compression algorithm is meant.
Coverage decreased (-0.4%) to 13.241% when pulling 3601525786d3a0083fea4344ad2cd2fa07f08a90 on piegamesde:compression into 7a1b6d986e6fbd01862356d47827b8b357349a22 on flow:develop.
The
NBTi/oStream
s only provide a boolean flag to tell if the stream is compressed or not. In reality, there are three possible compressions: none, gzip or zlib. The latter one is heavily used to store Chunk NBT data in Minecraft.This commit introduces three constants for the compression. They happen to be matching the ID convention used by Minecraft. This way, no additional case checking is required to handle the stream compression when reading region files.
The old methods using a boolean are marked as deprecated from now on, since they are ambiguous about which compression algorithm is meant.