Skip to content

aAndrzej-dev/Aadev.NBT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Aadev.NBT

Nuget Package

https://www.nuget.org/packages/Aadev.NBT/

Named Binary Tag

NBT (Named Binary Tag) is a tag based binary format designed to carry large amounts of binary data with smaller amounts of additional data.

Usage

Reading

  • Gzipped file
 NTag tag = NReader.FromGzippedFile("exaplne.nbt", Endianness.Big);
  • Raw file
 NTag tag = NReader.FromRawFile("exaplne.nbt", Endianness.Big);
  • Gzipped Byte array
 NTag tag = NReader.FromGzippedByteArray(byteArray, Endianness.Big);
  • Raw Byte array
 NTag tag = NReader.FromByteArray(byteArray, Endianness.Big);

Writing

  • To file
NWriter.WriteToFile(filename, tag, Endianness.Big);
  • To byte array
byte[] bytes = NWriter.WriteToByteArray(tag, Endianness.Big);

Endianness

Use Big-endian for Java Edition NBT Files and Litle-endian for Bedrock Edition NBT Files

Special Thanks

This project is based on documentation from wiki.vg and fandom.com

About

NBT (Named Binary Tag) Reader and Writer library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages