forked from sergeych/crypto2
use asByteArray _view_ where possible (optimization)
This commit is contained in:
1 parent
b5ac0c4e7e
commit
6431d4896a
17 files changed
+50
-22
No files matched your search
@@ -4,7 +4,7 @@ import net.sergeych.bipack.BipackDecoder
|
||||
import net.sergeych.bipack.BipackEncoder
|
||||
|
||||
|
||||
inline fun <reified T>bipack(value: T): UByteArray = BipackEncoder.encode(value).toUByteArray()
|
||||
inline fun <reified T>bipack(value: T): UByteArray = BipackEncoder.encode(value).asUByteArray()
|
||||
|
||||
inline fun <reified T>biunpack(value: UByteArray): T = BipackDecoder.decode(value.toByteArray())
|
||||
inline fun <reified T>biunpack(value: UByteArray): T = BipackDecoder.decode(value.asByteArray())
|
||||
|
||||
Reference in new issue
Block a user