refs #35 refac to get caching out of Obj; it is decoder/encoder matter now

This commit is contained in:
sergeych committed 2025-07-19 14:19:50 +03:00
1 parent 405ff2ec2b
commit 20181c63a1
4 files changed
+70 -68

No files matched your search

@@ -39,9 +39,8 @@ open class LynonDecoder(val bin: BitInput, val settings: LynonSettings = LynonSe
type.objClass.deserialize(scope, this, type)
}
// todo: rewrite/remove?
suspend fun unpackObject(scope: Scope, type: ObjClass): Obj {
return type.deserialize(scope, this, null)
suspend fun decodeObject(scope: Scope, type: ObjClass): Obj {
return decodeCached { type.deserialize(scope, this, null) }
}
fun unpackBinaryData(): ByteArray = bin.decompress()