scylladb / cpp-rust-driver

API-compatible rewrite of https://github.com/scylladb/cpp-driver as a wrapper for Rust driver.
GNU Lesser General Public License v2.1
16 stars 11 forks source link

Add support for compression #92

Closed Gor027 closed 1 year ago

Gor027 commented 1 year ago

The original C++ driver does not support compression, so new APIs are introduced. CassCompressionType enum is added with values CASS_COMPRESSION_LZ4 and CASS_COMPRESSION_SNAPPY, those are the only compression algorithms that Rust driver supports currently.

Added cass_cluster_set_compression that sets the preferred compression type in the SessionBuilder object of the cluster.

Fixes #91

Pre-review checklist

Lorak-mmk commented 1 year ago

This is a new functionality so it needs some test - even a simple one (just connecting to a cluster with compression) will suffice.