Skip to content

Add native-protocol compression option (LZ4 default)#14

Merged
mzitnik merged 1 commit into
mainfrom
add-compression
Jun 6, 2026
Merged

Add native-protocol compression option (LZ4 default)#14
mzitnik merged 1 commit into
mainfrom
add-compression

Conversation

@mzitnik

@mzitnik mzitnik commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds connection-level block compression to the MATLAB client, exposed through a type-safe Compression enum and wired through to clickhouse-cpp's ClientOptions::SetCompressionMethod. The native TCP
client supports three methods — None / LZ4 / ZSTD — and the connection now defaults to LZ4.

opts = struct('compression', Compression.ZSTD); % or .LZ4 (default) / .None
c = ClickHouseClient('localhost', 9000, 'default', '', opts);

⚠️ Behavior change

The connection now uses LZ4 by default (previously no compression).
Existing callers that omit options.compression will start compressing on the wire after upgrading. Pass options.compression =
Compression.None to restore the old behavior.

@mzitnik
mzitnik merged commit 95622b4 into main Jun 6, 2026
12 checks passed
@mzitnik
mzitnik deleted the add-compression branch June 10, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant