implement padding, support UByteArray

This commit is contained in:
2025-11-10 13:51:21 +01:00
parent f825b6a7ab
commit e4c3a0f45f
9 changed files with 404 additions and 166 deletions

View File

@@ -7,6 +7,12 @@ enum class ByteOrder {
): ByteArray {
return bytes
}
override fun normalize(
bytes: UByteArray,
): UByteArray {
return bytes
}
},
LITTLE_ENDIAN {
override fun normalize(
@@ -14,9 +20,19 @@ enum class ByteOrder {
): ByteArray {
return bytes.reversedArray()
}
override fun normalize(
bytes: UByteArray,
): UByteArray {
return bytes.reversedArray()
}
};
internal abstract fun normalize(
bytes: ByteArray,
): ByteArray
internal abstract fun normalize(
bytes: UByteArray,
): UByteArray
}