MySqlConnector icon indicating copy to clipboard operation
MySqlConnector copied to clipboard

Support zstd compression

Open bgrainger opened this issue 6 years ago • 4 comments

MySQL 8.0.18 introduces the option to use zstd compression:

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-18.html#mysqld-8-0-18-connection-control

MySQL now provides more control over the use of compression to minimize the number of bytes sent over connections to the server. Previously, a given connection was either uncompressed or used the zlib compression algorithm. Now, it is also possible to use the zstd algorithm (zstd 1.3), and to select a compression level for zstd connections.

See also WL12039 and WL12475.

There are a few NuGet packages for zstandard; at a glance they appear to be wrappers over the native library, not a managed implementation.

This should probably be implemented as an optional plugin that can be enabled at runtime, rather than adding more code and dependencies to the core package.

bgrainger avatar Oct 14 '19 17:10 bgrainger

This should be much easier to deliver if Zstandard comes to .NET 7.0: https://github.com/dotnet/runtime/issues/59591

bgrainger avatar Dec 19 '21 23:12 bgrainger

MySql.Data 8.0.33 removed zstd support (https://dev.mysql.com/doc/relnotes/connector-net/en/news-8-0-33.html):

The zstd compression algorithm is deactivated in the connector. (Bug #35281610)

bgrainger avatar Apr 26 '23 15:04 bgrainger

That was temporary. It's coming back in the next version

rykr avatar May 05 '23 18:05 rykr

I missed that a 100% C# port of Zstandard has been created: https://github.com/oleg-st/ZstdSharp

bgrainger avatar Jul 19 '23 13:07 bgrainger