Update binary json funcs docs to reflect latest changes

This commit is contained in:
DBotThePony 2023-07-26 12:22:29 +07:00
parent 07d698aeb5
commit 7a2ce84e5f
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -191,9 +191,7 @@ private enum class BinaryElementType(private val predicate: Predicate<JsonElemen
} }
/** /**
* Writes binary json to stream in Starbound Object Notation format * Writes json in efficient binary form to stream
*
* just copy pasted this code from my another project because i was lazy
*/ */
fun OutputStream.writeBinaryJson(element: JsonElement) { fun OutputStream.writeBinaryJson(element: JsonElement) {
for (writer in BinaryElementType.cached) { for (writer in BinaryElementType.cached) {
@ -208,9 +206,7 @@ fun OutputStream.writeBinaryJson(element: JsonElement) {
} }
/** /**
* Reads binary json from stream in Starbound Object Notation format * Reads json in binary form from stream
*
* just copy pasted this code from my another project because i was lazy
*/ */
fun InputStream.readBinaryJson(sizeLimit: NbtAccounter = NbtAccounter(1L shl 18 /* 256 KiB */)): JsonElement { fun InputStream.readBinaryJson(sizeLimit: NbtAccounter = NbtAccounter(1L shl 18 /* 256 KiB */)): JsonElement {
sizeLimit.accountBytes(1L) sizeLimit.accountBytes(1L)