This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new fbf7246  feat: Make compression_level() pub (#335)
fbf7246 is described below

commit fbf7246b7fb68112297a16664605f65316533750
Author: Emily Matheys <[email protected]>
AuthorDate: Wed Nov 12 08:14:59 2025 +0200

    feat: Make compression_level() pub (#335)
---
 avro/src/codec.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/avro/src/codec.rs b/avro/src/codec.rs
index 813dc15..fc8f49e 100644
--- a/avro/src/codec.rs
+++ b/avro/src/codec.rs
@@ -30,7 +30,9 @@ impl DeflateSettings {
         DeflateSettings { compression_level }
     }
 
-    fn compression_level(&self) -> u8 {
+    /// Get the compression level as a `u8`, note that this means the 
[`miniz_oxide::deflate::CompressionLevel::DefaultCompression`] variant
+    /// will appear as `255`, this is normalized by the [`miniz_oxide`] crate 
later.
+    pub fn compression_level(&self) -> u8 {
         self.compression_level as u8
     }
 }

Reply via email to