mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
user-selectable compression methods: zstd and snappy
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user