Support HTTP response compression#50
Merged
Merged
Conversation
dkropachev
force-pushed
the
dk/driver-626-response-compression
branch
4 times, most recently
from
July 13, 2026 16:10
ea8b8b2 to
6d076f4
Compare
dkropachev
force-pushed
the
dk/driver-626-response-compression
branch
from
July 13, 2026 16:15
6d076f4 to
180c517
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira task: https://scylladb.atlassian.net/browse/DRIVER-626
Fixes #29
Summary
Configadvertises noAccept-Encodingand does not decode compressed responsesConfig::content_encoding_decodersHttpContentEncodingDecoderAPI so each decoder advertises its accepted response encodings and decodes the specific matching content-encoding tokenZlibContentEncodingDecoderfor gzip/deflate when zlib is available; callers must configure it explicitly and can advertise a gzip/deflate subsetAccept-Encodingfor requests routed to Alternator nodesAPI Surface
Examples:
scylladb::alternator::Config cfg; cfg.content_encoding_decoders.push_back( std::make_shared<scylladb::alternator::ZlibContentEncodingDecoder>());scylladb::alternator::Config cfg; cfg.content_encoding_decoders.push_back( std::make_shared<scylladb::alternator::ZlibContentEncodingDecoder>( std::vector<std::string>{"gzip"})); cfg.content_encoding_decoders.push_back(std::make_shared<ZstdDecoder>());Testing
make test-unitmake checkcmake -S . -B build-no-zlib-check -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE -DALTERNATOR_CLIENT_CPP_ENABLE_AWS=OFF -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror" && cmake --build build-no-zlib-check --parallel && ctest --test-dir build-no-zlib-check --output-on-failure -E Integrationcmake -S . -B build-aws-check -DALTERNATOR_CLIENT_CPP_REQUIRE_AWS=ONfails locally because AWSSDK with the dynamodb component is not installed in this container