MySqlConnector
                                
                                 MySqlConnector copied to clipboard
                                
                                    MySqlConnector copied to clipboard
                            
                            
                            
                        Support zstd compression
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
zlibcompression algorithm. Now, it is also possible to use thezstdalgorithm (zstd 1.3), and to select a compression level forzstdconnections.
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.
This should be much easier to deliver if Zstandard comes to .NET 7.0: https://github.com/dotnet/runtime/issues/59591
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)
That was temporary. It's coming back in the next version
I missed that a 100% C# port of Zstandard has been created: https://github.com/oleg-st/ZstdSharp