Giter VIP home page Giter VIP logo

mc_recompress's Introduction

Minecraft Recompressor
======================

Licence
-------

    Copyright (C) 2014 Timothy Goddard


    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Purpose
-------

Minecraft recompressor scans a directory for Minecraft Anvil Region (.mca) files and converts them in to a more compressible form. For various good reasons, .mca files aren't as small as they could be:

* They compress each individual chunk within the file, of which there can be up to 1024. These don't compress again well as compressed data has high entropy.
* Large blocks of data are contained within each section. Data with the same interpretation (light levels, material IDs, etc) is scattered through the chunk.
* They may contain dead, unused space to pad chunks to 4096-byte boundaries.
* They include cached computed data - height maps, light levels.

All of these are necessary to simplify use in real-time within Minecraft, but add to the space these files take up. This utility compresses .mca files to its own "MRI" format, usually appearing as .mri.gz or .mri.bz2 . This format:

* Is a single compressed NBT file, like many other Minecraft formats.
* Contains the same data as the .mca .
* Extracts a set of block data fields (Blocks, Add, Data, BlockLight, SkyLight) and groups them together so that the same type of data is together inside the compressed file.

This is a form of lossy compression, as it re-compresses the .mca file differently. You should run it on a COPY of your world, not the originals, and check that the reproduced world is identical. In future options to remove reproducible data such as lighting calculations may be provided.

mc_recompress's People

Contributors

pruby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gabik21

mc_recompress's Issues

Command Line / Automation

This is an enhancement request more than an issue.

The idea behind this compressor is great, and having a GUI is a nice touch... however backups usually wind up being an automated process. Seeing that the program auto launches a GUI when running with the command "java -jar mcrecompress.jar" I can only imagine that it's GUI only.

It would be great if this had a command line .jar and a GUI .jar (which ran those commands available in the command line .jar) so it can be used in an automated setup. Something as simple as "java -jar mcrecompress.jar -compress [source] [destination]" and "java -jar mcrecompress.jar -decompress [source] [destination]" would be plenty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.