Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import java.io.ByteArrayOutputStream
import java.io.File
import java.sql.Connection
import java.sql.DriverManager
import java.util.zip.Deflater
import java.util.zip.GZIPOutputStream

@Serializable
Expand Down Expand Up @@ -140,7 +141,9 @@ object AppData {

fun gzipCompress(data: ByteArray): ByteArray {
val bos = ByteArrayOutputStream(data.size / 4)
GZIPOutputStream(bos).use { it.write(data) }
object : GZIPOutputStream(bos) {
init { def.setLevel(Deflater.BEST_SPEED) }
}.use { it.write(data) }
return bos.toByteArray()
}
}
Expand Down
Loading