[feat](trx-server): gzip-compress history replay blob

Add flate2 dependency and a new AUDIO_MSG_HISTORY_COMPRESSED (0x0a)
wire type. The server gzip-compresses the full history blob before
sending; JSON history compresses ~10-20x so both transfer size and
client wait time drop significantly. The client decompresses and
dispatches sub-messages from the embedded framed stream. MAX_PAYLOAD_SIZE
is kept at 1 MB for normal messages; a separate 16 MB limit is applied
only to the compressed history type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-09 21:17:49 +01:00
parent 26fbd37b6d
commit 409b173f62
7 changed files with 76 additions and 15 deletions
+1
View File
@@ -29,6 +29,7 @@ members = [
resolver = "2"
[workspace.dependencies]
flate2 = "1"
tokio = "1"
tokio-serial = "5"
serde = "1"