From 8bc25e7e479df1dbd6d33fdf0851a5d7143d82aa Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 27 Mar 2021 22:55:35 +0000 Subject: [PATCH] Set compression lewel to -9 Signed-off-by: Graham --- .../main/kotlin/org/openrs2/archive/web/CachesController.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archive/src/main/kotlin/org/openrs2/archive/web/CachesController.kt b/archive/src/main/kotlin/org/openrs2/archive/web/CachesController.kt index 386df6ec..9e28c323 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/web/CachesController.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/web/CachesController.kt @@ -14,6 +14,7 @@ import org.openrs2.archive.cache.CacheExporter import org.openrs2.cache.DiskStoreZipWriter import java.nio.file.attribute.FileTime import java.time.Instant +import java.util.zip.Deflater import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream import javax.inject.Inject @@ -93,6 +94,8 @@ public class CachesController @Inject constructor( call.respondOutputStream(contentType = ContentType.Application.Zip) { ZipOutputStream(this).use { output -> output.bufferedWriter().use { writer -> + output.setLevel(Deflater.BEST_COMPRESSION) + val timestamp = FileTime.from(Instant.EPOCH) for (key in exporter.exportKeys(id)) {