compress parsed data to .json.zst

This commit is contained in:
2026-09-23 18:25:15 +02:00
parent c6b27cd3c9
commit 55f7d453b1
9 changed files with 67 additions and 35 deletions
+6 -5
View File
@@ -6,9 +6,11 @@ Simple web application created using DTLib.Web.
Restart web application once per day to delete outdated data and clean RAM.
## Config
`ZstdCompressionLevel` in `config.json` - zstd level of stored parsed save data (default 10)
`SaveUpload` section of `config.json`:
- `MaxSizeCompressedBytes` - max size of uploaded `.tar.zst` (default 60 MiB)
- `MaxSizePlainTextBytes` - max size of the game data entry after decompression (default 200 MiB)
- `MaxSizeCompressedMegabytes` - max size of uploaded `.tar.zst` in MiB (default 60)
- `MaxSizePlainTextMegabytes` - max size of the game data entry after decompression in MiB (default 200)
## Routes
### POST `/uploadSave`
@@ -52,12 +54,11 @@ Restart web application once per day to delete outdated data and clean RAM.
### GET `/getSaveData`
- **Query Params:**
- `id` - id of uploaded save file
- **Response:**
```json5
- **Response:** `application/zstd` - single zstd frame containing json:
```json
{
"key0": [ "objects" ],
"key1": [ "objects" ],
//...
}
```
or `{ "errorMessage": "string" }`