Wait im stupid

This commit is contained in:
DBotThePony 2023-07-25 14:29:38 +07:00
parent 5aa52383d8
commit 88ddc51254
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -35,8 +35,7 @@ object DecimalCodec : Codec<Decimal> {
ops.getIntStream(input).flatMap { ops.getIntStream(input).flatMap {
try { try {
DataResult.success(Pair(Decimal.fromByteArray( DataResult.success(Pair(Decimal.fromByteArray(
it.mapToObj { val v = it.toLong(); Stream.of(v and 0xFFL, (v and 0xFF00L) ushr 8, (v and 0xFF0000L) ushr 16, (v and 0xFF000000L) ushr 24) } it
.flatMap { it }
.collect(::ByteArrayList, { v, a -> v.add(a.toByte()) }, ByteArrayList::addAll) .collect(::ByteArrayList, { v, a -> v.add(a.toByte()) }, ByteArrayList::addAll)
.toByteArray() .toByteArray()
), ops.empty())) ), ops.empty()))