implemented save file compression in browser

This commit is contained in:
Altair-sh
2026-09-23 17:26:40 +02:00
parent 54ddc11b44
commit a022dd00dc
25 changed files with 1331 additions and 142 deletions
+12 -2
View File
@@ -5,9 +5,19 @@ export const defaultConfig = {
saveParserBackend: {
url: 'http://127.0.0.1:5226',
},
// TODO: implement auth api
auth: {},
},
saveUpload: {
// Size of a save if it is uploaded as uncompressed. The browser packs
// saves as a stream, so these limits are about the backend's disk
// rather than about memory.
maxSizePlainTextBytes: 200 * 1024 * 1024,
// Archives produced by the game, recognized by the zip magic bytes.
maxSizeCompressedBytes: 60 * 1024 * 1024,
// read COMPRESSION.md
zstdCompressionLevel: 11,
},
}
export type AppConfig = typeof defaultConfig
export type SaveUploadConfig = AppConfig['saveUpload']