less warnings

This commit is contained in:
Sergey Chernov 2025-08-13 23:24:51 +03:00
parent 2adb0ff512
commit 48a7f0839c
3 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,9 @@
*
*/
@file:OptIn(ExperimentalForeignApi::class, ExperimentalForeignApi::class, ExperimentalForeignApi::class)
@file:OptIn(ExperimentalForeignApi::class, ExperimentalForeignApi::class, ExperimentalForeignApi::class,
ExperimentalForeignApi::class
)
package net.sergeych

View File

@ -99,6 +99,8 @@ interface BitInput {
fun decompressStringOrNull(): String? = decompressOrNull()?.decodeToString()
fun decompressString(): String = decompress().decodeToString()
@Suppress("unused")
fun unpackDouble(): Double {
val bits = getBits(64)
return Double.fromBits(bits.toLong())

View File

@ -102,7 +102,7 @@ class BitArray(val bytes: UByteArray, val lastByteBits: Int) : BitList {
* in the bit 0x02 of the first byte, etc.
*
* This allows automatic fill of the last byte with zeros. This is important when
* using bytes stored from [asByteArray] or [asUbyteArray]. When converting to
* using bytes stored from [asByteArray] or `asUbyteArray`. When converting to
* bytes, automatic padding to byte size is applied. With such bit order, constructing
* [BitInput] to read from [ByteArray.toUByteArray] result only provides 0 to 7 extra zeroes bits
* at teh end which is often acceptable. To avoid this, use [toBitArray]; the [BitArray]