From 007578052c928d2a9f604e31b1983e78e47418db Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 12 Oct 2019 15:47:35 +0000 Subject: [PATCH] Use Z_BEST_SPEED for ZRLE The default strategy loads the CPU too much when streaming at 60 FPS. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 2800ade..f2fe829 100644 --- a/src/server.c +++ b/src/server.c @@ -748,7 +748,7 @@ static void on_connection(uv_stream_t *server_stream, int status) client->ref = 1; client->server = server; - if (deflateInit(&client->z_stream, Z_DEFAULT_COMPRESSION) != Z_OK) { + if (deflateInit(&client->z_stream, Z_BEST_SPEED) != Z_OK) { free(client); return; }