static Action <HttpListenerContext> GzipEchoValue(string value)
    => context => {
        context.Response.Headers.Add("Content-encoding", "gzip");

        using var gzip = new GZipStream(context.Response.OutputStream, CompressionMode.Compress, true);

        gzip.WriteStringUtf8(value);
    };