user-selectable compression methods: zstd and snappy

This commit is contained in:
minjaesong
2023-12-21 03:46:55 +09:00
parent 44ff974b86
commit 6f4e60284b
4 changed files with 77 additions and 19 deletions

View File

@@ -279,23 +279,7 @@ class ByteArray64(initialSize: Long = BANK_SIZE.toLong()) {
fun writeToFile(file: File) {
var fos = FileOutputStream(file, false)
// following code writes in-chunk basis
/*fos.write(__data[0])
fos.flush()
fos.close()
if (__data.size > 1) {
fos = FileOutputStream(file, true)
for (i in 1..__data.lastIndex) {
fos.write(__data[i])
fos.flush()
}
fos.close()
}*/
/*forEach {
fos.write(it.toInt())
}*/
forEachUsedBanks { count, bytes ->
fos.write(bytes, 0, count)
}