refs #35 Lynon builtin compression
This commit is contained in:
1 parent
34bc7297bd
commit
f3d766d1b1
14 files changed
+830
-216
No files matched your search
@@ -28,10 +28,10 @@ open class LynonDecoder(val bin: BitInput,val settings: LynonSettings = LynonSet
|
||||
return decodeCached { type.deserialize(scope, this) }
|
||||
}
|
||||
|
||||
fun unpackBinaryData(): ByteArray? {
|
||||
val size = bin.unpackUnsigned()
|
||||
return bin.getBytes(size.toInt())
|
||||
}
|
||||
fun unpackBinaryData(): ByteArray = bin.decompress()
|
||||
|
||||
@Suppress("unused")
|
||||
fun unpackBinaryDataOrNull(): ByteArray? = bin.decompressOrNull()
|
||||
|
||||
fun unpackBoolean(): Boolean {
|
||||
return bin.getBit() == 1
|
||||
|
||||
Reference in new issue
Block a user