return aabb;
}
@Override
public void deflate() {
final TeraDeflator def = new TeraStandardDeflator();
if (logger.isDebugEnabled()) {
int blocksSize = blockData.getEstimatedMemoryConsumptionInBytes();
int sunlightSize = sunlightData.getEstimatedMemoryConsumptionInBytes();
int sunlightRegenSize = sunlightRegenData.getEstimatedMemoryConsumptionInBytes();
int lightSize = lightData.getEstimatedMemoryConsumptionInBytes();
int liquidSize = extraData.getEstimatedMemoryConsumptionInBytes();
int biomeSize = biomeData.getEstimatedMemoryConsumptionInBytes();
int totalSize = blocksSize + sunlightRegenSize + sunlightSize + lightSize + liquidSize + biomeSize;
blockData = def.deflate(blockData);
lightData = def.deflate(lightData);
extraData = def.deflate(extraData);
biomeData = def.deflate(biomeData);
int blocksReduced = blockData.getEstimatedMemoryConsumptionInBytes();
int lightReduced = lightData.getEstimatedMemoryConsumptionInBytes();
int liquidReduced = extraData.getEstimatedMemoryConsumptionInBytes();
int biomeReduced = biomeData.getEstimatedMemoryConsumptionInBytes();
int totalReduced = blocksReduced + sunlightRegenSize + sunlightSize + lightReduced + liquidReduced + biomeReduced;
double blocksPercent = 100d - (100d / blocksSize * blocksReduced);
double lightPercent = 100d - (100d / lightSize * lightReduced);
double liquidPercent = 100d - (100d / liquidSize * liquidReduced);
double biomePercent = 100d - (100d / biomeSize * biomeReduced);
double totalPercent = 100d - (100d / totalSize * totalReduced);
logger.debug("chunk {}: " +
"size-before: {} " +
"bytes, size-after: {} " +
"bytes, total-deflated-by: {}%, " +
"blocks-deflated-by={}%, " +
"light-deflated-by={}%, " +
"liquid-deflated-by={}%, " +
"biome-deflated-by={}%",
chunkPos,
SIZE_FORMAT.format(totalSize),
SIZE_FORMAT.format(totalReduced),
PERCENT_FORMAT.format(totalPercent),
PERCENT_FORMAT.format(blocksPercent),
PERCENT_FORMAT.format(lightPercent),
PERCENT_FORMAT.format(liquidPercent),
PERCENT_FORMAT.format(biomePercent));
ChunkMonitor.fireChunkDeflated(this, totalSize, totalReduced);
} else {
final int oldSize = getEstimatedMemoryConsumptionInBytes();
blockData = def.deflate(blockData);
lightData = def.deflate(lightData);
extraData = def.deflate(extraData);
biomeData = def.deflate(biomeData);
ChunkMonitor.fireChunkDeflated(this, oldSize, getEstimatedMemoryConsumptionInBytes());
}
}