Querz / NBT

A java implementation of the NBT protocol, including a way to implement custom tags.
MIT License
177 stars 47 forks source link

Improve the reader and writer helpers #57

Closed SandroHc closed 1 week ago

SandroHc commented 3 years ago

Added support for Input/OutputStreams and created helpful builders. Also wrapped the file methods on buffered streams to improve reading/writing performance.

Here is an example:

// with the current implementation
NBTUtil.writeLE(tag, "out.schematic", true);

// with the new builder
NBTUtil.Writer.write().tag(tag).littleEndian().compressed(true).to("out.schematic");
coveralls commented 3 years ago

Coverage Status

Coverage increased (+5.5%) to 83.389% when pulling 5bf03fc55f0a55b3722e86ce87c84f861ac67aef on SandroHc:master into ae1f2ba764c5cd0b61b03b64538af20cf9a146b2 on Querz:master.