revert: partial code

This commit is contained in:
septs 2025-02-26 20:35:57 +08:00
parent ba8a4b87cb
commit fd4023194a
Signed by: septs
SSH key fingerprint: SHA256:ElK0p6DNkbsqYUdJ3I9QHDVf21SQD0c2r+hd7s/r5Co

View file

@ -12,10 +12,13 @@ fun String.decodeHex(): ByteArray {
return out
}
fun ByteArray.encodeHex(): String = buildString {
for (element in this@encodeHex) {
append(String.format("%02X", element))
fun ByteArray.encodeHex(): String {
val sb = StringBuilder()
val length = size
for (i in 0 until length) {
sb.append(String.format("%02X", this[i]))
}
return sb.toString()
}
fun formatFreeSpace(size: Int): String =