summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-10-27 15:37:34 +0100
committerGitHub <noreply@github.com>2023-10-27 17:37:34 +0300
commitcd584e0357b82ec5cad12156fd7a5b65f545a0d0 (patch)
tree3acca5ef3a84c5ed1defab0588431f71950d6e39 /web
parent89978b5b84297596af969358bd159e87f71cab64 (diff)
ZSTD and GZIP/DEFLATE streaming support (#16268)
* move compression header to compression.h * prototype with zstd compression * updated capabilities * no need for resetting compression * left-over reset function * use ZSTD_compressStream() instead of ZSTD_compressStream2() for backwards compatibility * remove call to LZ4_decoderRingBufferSize() * debug signature failures * fix the buffers of lz4 * fix decoding of zstd * detect compression based on initialization; prefer ZSTD over LZ4 * allow both lz4 and zstd * initialize zstd streams * define missing ZSTD_CLEVEL_DEFAULT * log zero compressed size * debug log * flush compression buffer * add sender compression statistics * removed debugging messages * do not fail if zstd is not available * cleanup and buildinfo * fix max message size, use zstd level 1, add compressio ratio reporting * use compression level 1 * fix ratio title * better compression error logs * for backwards compatibility use buffers of COMPRESSION_MAX_CHUNK * switch to default compression level * additional streaming error conditions detection * do not expose compression stats when compression is not enabled * test for the right lz4 functions * moved lz4 and zstd to their own files * add gzip streaming compression * gzip error handling * added unittest for streaming compression * eliminate a copy of the uncompressed data during zstd compression * eliminate not needed zstd allocations * cleanup * decode gzip with Z_SYNC_FLUSH * set the decoding gzip algorithm * user configuration for compression levels and compression algorithms order * fix exclusion of not preferred compressions * remove now obsolete compression define, since gzip is always available * rename compression algorithms order in stream.conf * move common checks in compression.c * cleanup * backwards compatible error checking
Diffstat (limited to 'web')
-rw-r--r--web/api/web_api_v1.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 6488640177..458b29751f 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -1272,12 +1272,8 @@ inline int web_client_api_request_v1_info_fill_buffer(RRDHOST *host, BUFFER *wb)
buffer_json_member_add_boolean(wb, "web-enabled", web_server_mode != WEB_SERVER_MODE_NONE);
buffer_json_member_add_boolean(wb, "stream-enabled", default_rrdpush_enabled);
-#ifdef ENABLE_RRDPUSH_COMPRESSION
buffer_json_member_add_boolean(wb, "stream-compression",
- host->sender && stream_has_capability(host->sender, STREAM_CAP_COMPRESSION));
-#else // ! ENABLE_RRDPUSH_COMPRESSION
- buffer_json_member_add_boolean(wb, "stream-compression", false);
-#endif // ENABLE_RRDPUSH_COMPRESSION
+ host->sender && host->sender->compressor.initialized);
#ifdef ENABLE_HTTPS
buffer_json_member_add_boolean(wb, "https-enabled", true);