A library for Minecraft: Bedrock Edition archive format (.brarchive) written in Java.
Note
This library also includes a CLI to help serialize directories and deserialize archives.
Deserializing archives using this library is as follows:
try (InputStream inputStream = new FileInputStream("file.brarchive")) {
byte[] data = inputStream.readAllBytes();
BinaryStream stream = new BinaryStream(data);
Map<String, String> entries = new Brarchive(stream).deserialize();
}
catch (IOException _) {};or, to serialize archives:
Map<String, String> entries = Map.of(
"name", "entry content"
);
BinaryStream stream = new BinaryStream();
new Brarchive(stream).serialize(entries);
try {
Files.write("file.brarchive", stream.data());
} catch (IOException _) {};Ensure you have Java 8 or later installed:
java --versionIf Java is missing, download it from one of the official sources:
To generate .brarchive files
java -jar brarchive.jar generate --input "<directory>" --output "<directory>"and to extract the contents of .brarchive files
java -jar brarchive.jar extract --input "<directory/file>" --output "<directory>"You can also get help via the help command:
java -jar brarchive.jar helpThis project is open-source under the MIT License. Feel free to modify and contribute!
# Fork the repository
git clone https://github.com/xKingDark/brarchive-java.git
# Create a new branch
git checkout -b feature-branch
# Commit your changes
git commit -m "Added new feature"
# Push to GitHub
git push origin feature-branch
# Submit a Pull Request