From ddb2554fff073eed0b73a43825b2c007c895bc4d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 05:58:13 -0300 Subject: replica: a far client's content cache and zstd: the session lists its join's blobs by BLAKE3 hash first (wire 16 `blobs`), the client finds each in the core it leaves or on disk ($XDG_CACHE_HOME/pardes/blobs, hashed again on load, a bad file a miss, the least recently used evicted past 1 GiB) and asks for the rest (`want`), and everything after the welcome goes in zstd envelopes (level 6 over 8 MiB for the join, an undo snapshot being a near copy of its text, then level 3), so `ssh -C` leaves the default command; a far client (through ssh, or PARDES_REPLICA_FAR) keeps what it was sent and, at its end, what it made; a hangup ends a remote client the normal way; through the box a client holding the blobs is drawn in 2.4 s where main took 7.0 to 11.9, and a first join of a session with undo in 7.1 s where main took 11.9; libzstd 1.5.7 vendored, its allocations on c_heap, a second copy refused by shared-libs-check; tests for the cache's verify-on-load, its eviction and a far join's blobs sent once; test/daemon.py's far clients Co-Authored-By: Claude Opus 5.5 --- docs/shared-libs.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/shared-libs.md') diff --git a/docs/shared-libs.md b/docs/shared-libs.md index 79f3cdb9..ce0c7d3f 100644 --- a/docs/shared-libs.md +++ b/docs/shared-libs.md @@ -49,6 +49,7 @@ and gui columns are the two binaries. | Regex | mvzr | pardes | 1 → 1 | 17 KiB | Zig | | Parsing | tree-sitter | pardes | 1 → 1 | | `ts_set_allocator` → c_heap | | Window, input, GPU | SDL 3.4.18 | gui | 1 → 1 | 1009 KiB | `SDL_SetMemoryFunctions` | +| Compress and decompress a far replica's stream (2026-10-30) | zstd 1.5.7 (the upstream tarball; build.zig compiles its lib/: no assembly, no threads, the dfast and lazy block compressors alone) | src/replica.zig | 0 → 1 | 380 KiB tty (516 with every block compressor) | `ZSTD_customMem` → c_heap | Text section: tty 61,369,343 → 61,294,855 bytes (**−74,488**); gui 67,336,392 → 67,182,000 bytes (**−154,392**). -- cgit v1.3