Skip to content

A C++ library to read and write data in NBT format.

License

Notifications You must be signed in to change notification settings

maspitz/nbtview

Repository files navigation

nbtview

A C++ library to read and write data in the NBT format used by Minecraft.

Usage

Example: Output an NBT file in a string form.

    std::ifstream infile("my_file.nbt");

    auto [root_name, root_tag] = nbt::read_binary(infile);
    std::cout << "root_name: " << root_name << std::endl;
    std::cout << "root_tag: " << root_tag << std::endl;

See test/test_nbtview.cpp for more example usage.

Building

Requirements

zlib is required. In Fedora (for example) this can be satisfied via dnf install zlib-devel

Compiling

git clone https://github.com/maspitz/nbtview
cd nbtview
cmake -S . -B build
cmake --build build -- -j$(nproc)

Documentation

You can find the interface documentation online at: https://maspitz.github.io/nbtview/html/namespacenbtview.html

To build documentation locally using doxygen, run:

cmake --build build --target docs

Documentation is emitted into build/doxygen/html.

Testing

cmake --build build --target test

Or run the test executables individually, e.g.: build/test_bigtest

About

A C++ library to read and write data in NBT format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published