Update binary json funcs docs to reflect latest changes
This commit is contained in:
parent
07d698aeb5
commit
7a2ce84e5f
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user