This commit is contained in:
Stedoss 2025-07-06 16:34:00 +01:00
parent 0ebf48dd29
commit b5bff780bb

View File

@ -17,7 +17,7 @@ class WTC {
private val VERSION_HEADER_BYTE_ARRAY = byteArrayOf((CURRENT_VERSION_HEADER.toInt() and 0xFF).toByte(), ((CURRENT_VERSION_HEADER.toInt() shr 8) and 0xFF).toByte()) private val VERSION_HEADER_BYTE_ARRAY = byteArrayOf((CURRENT_VERSION_HEADER.toInt() and 0xFF).toByte(), ((CURRENT_VERSION_HEADER.toInt() shr 8) and 0xFF).toByte())
fun compress(stream: String): ByteArray { fun compress(stream: String): ByteArray {
val lists = seperate(stream) val lists = separate(stream)
val xs = unsortedDiffPackShortsToBytes(lists.x) val xs = unsortedDiffPackShortsToBytes(lists.x)
val ys = unsortedDiffPackShortsToBytes(lists.y) val ys = unsortedDiffPackShortsToBytes(lists.y)
@ -188,7 +188,7 @@ class WTC {
return unpacked.toIntArray() return unpacked.toIntArray()
} }
private fun seperate(stream: String): FrameLists { private fun separate(stream: String): FrameLists {
val frames = stream.split(',') val frames = stream.split(',')
val frameCount = frames.size val frameCount = frames.size