martin-g commented on code in PR #3095:
URL: https://github.com/apache/avro/pull/3095#discussion_r1716807985
##########
lang/rust/avro/src/codec.rs:
##########
@@ -49,7 +49,13 @@ pub enum Codec {
/// CRC32 checksum of the uncompressed data in the block.
Snappy,
#[cfg(feature = "zstandard")]
+ /// The `Zstandard` codec uses Facebook's
[Zstandard](https://facebook.github.io/zstd/) with the
+ /// default compression level.
Zstandard,
+ #[cfg(feature = "zstandard")]
+ /// This codec is the same as `Zstandard` but allows specifying the
compression level.
+ #[strum(disabled)]
+ ZstandardWithLevel(ZstandardLevel),
Review Comment:
I also pushed similar settings for Xz!
Snappy does not provide APIs for setting compression level (or anything
other), so there is no need of changes!
Deflate provides its own `EncodeOptions` but we cannot use it in our `Codec`
enum because it does not implement several traits (Clone, Copy, Eq and
PartialEq) ... Constructing EncodeOptions from its fields is not possible
because it does not provide such APIs.
So, only Zstd is left! I'll leave it to you @MarcoLugo !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]