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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7498866 · Nov 28, 2023
Jul 20, 2023
Jul 19, 2023
Nov 3, 2023
May 4, 2023
Jul 13, 2023
Nov 8, 2023
Nov 28, 2023
May 4, 2023
Jul 13, 2023
Nov 28, 2023
May 4, 2023
Jul 20, 2023

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