less debug noise

This commit is contained in:
sergeych committed 2025-08-14 01:36:37 +03:00
1 parent f45310f7d9
commit 202e70a99a
6 files changed
+26 -13

No files matched your search

@@ -28,7 +28,7 @@ import net.sergeych.lyng.obj.ObjString
object ObjLynonClass : ObjClass("Lynon") {
suspend fun encodeAny(scope: Scope, obj: Obj): Obj {
suspend fun encodeAny(scope: Scope, obj: Obj): ObjBitBuffer {
val bout = MemoryBitOutput()
val serializer = LynonEncoder(bout)
serializer.encodeAny(scope, obj)
@@ -51,4 +51,18 @@ object ObjLynonClass : ObjClass("Lynon") {
decodeAny(this, requireOnlyArg<Obj>())
}
}
}
}
@Suppress("unused")
suspend fun lynonEncodeAny(scope: Scope, value: Obj): UByteArray =
(ObjLynonClass.encodeAny(scope, value))
.bitArray.asUbyteArray()
@Suppress("unused")
suspend fun lynonDecodeAny(scope: Scope, encoded: UByteArray): Obj =
ObjLynonClass.decodeAny(
scope,
ObjBitBuffer(
BitArray(encoded, 8)
)
)