detect

fun NbtCompression.Companion.detect(source: BufferedSource): NbtCompression

Peek in the source and detect what NbtCompression is used.

Throws

NbtDecodingException

when unable to detect NbtCompression.


Peek in the byteArray and detect what NbtCompression is used.

Throws

NbtDecodingException

when unable to detect NbtCompression.

Peek in the stream and detect what NbtCompression is used.

The stream must support marking.

Throws

the stream does not support marking.