feat(server): compress the cached OpenSky snapshot for clients that accept gzip

The ~860 KB snapshot is held for an adaptive 9-300 s TTL and was served as
identity bytes to every request; no response in server/ set Content-Encoding or
Vary. Gzip it once per refresh beside the cached body, off the event loop, and
return the body and the header that names it together so the two can never
disagree. Live against an anonymous snapshot: 874,002 B to 258,012 B, 3.39x,
decompressing byte-identical to the uncompressed response.
This commit is contained in:
daikaginza committed 2026-09-29 10:57:45 +07:00
1 parent e7707d9a0f
commit daed0be99a
6 files changed
+405 -24

No files matched your search

+1
View File
@@ -35,6 +35,7 @@
"exports": ["./server/providers/live"],
"modules": [
"server/providers/live.js",
"server/providers/common/compress.js",
"server/providers/common/http.js",
"server/providers/common/query.js",
"server/providers/aircraft/opensky.js",