diff --git a/CHANGELOG.md b/CHANGELOG.md index ca584bb1..ebfac956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **Breaking**: Seal `Array` extension traits: `ArraySharded[Readable]Ext` and `ArrayChunkCacheExt` +- **Breaking**: Make `{Array,Bytes}PartialDecoderCache` private + +### Fixed +- Cleanup unnecessary lifetime constraints in partial decoders ## [0.18.3] - 2024-12-30 diff --git a/zarrs/src/array/codec.rs b/zarrs/src/array/codec.rs index ce291d8e..9a67bcca 100644 --- a/zarrs/src/array/codec.rs +++ b/zarrs/src/array/codec.rs @@ -6,7 +6,7 @@ //! //! A [`CodecChain`] represents a codec sequence consisting of any number of array to array and bytes to bytes codecs, and one array to bytes codec. //! A codec chain is itself an array to bytes codec. -//! A [`ArrayPartialDecoderCache`] or [`BytesPartialDecoderCache`] may be inserted into a codec chain to optimise partial decoding where appropriate. +//! A cache may be inserted into a codec chain to optimise partial decoding where appropriate. //! //! See . @@ -59,8 +59,8 @@ use thiserror::Error; mod array_partial_decoder_cache; mod bytes_partial_decoder_cache; -pub use array_partial_decoder_cache::ArrayPartialDecoderCache; -pub use bytes_partial_decoder_cache::BytesPartialDecoderCache; +pub(crate) use array_partial_decoder_cache::ArrayPartialDecoderCache; +pub(crate) use bytes_partial_decoder_cache::BytesPartialDecoderCache; mod byte_interval_partial_decoder; pub use byte_interval_partial_decoder::ByteIntervalPartialDecoder; diff --git a/zarrs/src/array/codec/array_partial_decoder_cache.rs b/zarrs/src/array/codec/array_partial_decoder_cache.rs index b9d33037..d3545204 100644 --- a/zarrs/src/array/codec/array_partial_decoder_cache.rs +++ b/zarrs/src/array/codec/array_partial_decoder_cache.rs @@ -8,17 +8,17 @@ use super::{ArrayPartialDecoderTraits, ArraySubset, CodecError, CodecOptions}; use super::AsyncArrayPartialDecoderTraits; /// A cache for an [`ArrayPartialDecoderTraits`] partial decoder. -pub struct ArrayPartialDecoderCache<'a> { +pub(crate) struct ArrayPartialDecoderCache { decoded_representation: ChunkRepresentation, - cache: ArrayBytes<'a>, + cache: ArrayBytes<'static>, } -impl<'a> ArrayPartialDecoderCache<'a> { +impl ArrayPartialDecoderCache { /// Create a new partial decoder cache. /// /// # Errors /// Returns a [`CodecError`] if initialisation of the partial decoder fails. - pub fn new( + pub(crate) fn new( input_handle: &dyn ArrayPartialDecoderTraits, decoded_representation: ChunkRepresentation, options: &CodecOptions, @@ -43,11 +43,11 @@ impl<'a> ArrayPartialDecoderCache<'a> { /// /// # Errors /// Returns a [`CodecError`] if initialisation of the partial decoder fails. - pub async fn async_new( + pub(crate) async fn async_new( input_handle: &dyn AsyncArrayPartialDecoderTraits, decoded_representation: ChunkRepresentation, options: &CodecOptions, - ) -> Result, CodecError> { + ) -> Result { let bytes = input_handle .partial_decode( &[ArraySubset::new_with_shape( @@ -65,7 +65,7 @@ impl<'a> ArrayPartialDecoderCache<'a> { } } -impl ArrayPartialDecoderTraits for ArrayPartialDecoderCache<'_> { +impl ArrayPartialDecoderTraits for ArrayPartialDecoderCache { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } @@ -90,7 +90,7 @@ impl ArrayPartialDecoderTraits for ArrayPartialDecoderCache<'_> { #[cfg(feature = "async")] #[async_trait::async_trait] -impl AsyncArrayPartialDecoderTraits for ArrayPartialDecoderCache<'_> { +impl AsyncArrayPartialDecoderTraits for ArrayPartialDecoderCache { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/array_to_bytes/bytes/bytes_partial_decoder.rs b/zarrs/src/array/codec/array_to_bytes/bytes/bytes_partial_decoder.rs index 9a71646e..19644c3b 100644 --- a/zarrs/src/array/codec/array_to_bytes/bytes/bytes_partial_decoder.rs +++ b/zarrs/src/array/codec/array_to_bytes/bytes/bytes_partial_decoder.rs @@ -17,16 +17,16 @@ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecod use super::{reverse_endianness, Endianness}; /// Partial decoder for the `bytes` codec. -pub(crate) struct BytesPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct BytesPartialDecoder { + input_handle: Arc, decoded_representation: ChunkRepresentation, endian: Option, } -impl<'a> BytesPartialDecoder<'a> { +impl BytesPartialDecoder { /// Create a new partial decoder for the `bytes` codec. pub(crate) fn new( - input_handle: Arc, + input_handle: Arc, decoded_representation: ChunkRepresentation, endian: Option, ) -> Self { @@ -38,7 +38,7 @@ impl<'a> BytesPartialDecoder<'a> { } } -impl ArrayPartialDecoderTraits for BytesPartialDecoder<'_> { +impl ArrayPartialDecoderTraits for BytesPartialDecoder { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/array_to_bytes/codec_chain.rs b/zarrs/src/array/codec/array_to_bytes/codec_chain.rs index 3a0678b8..2b41fe63 100644 --- a/zarrs/src/array/codec/array_to_bytes/codec_chain.rs +++ b/zarrs/src/array/codec/array_to_bytes/codec_chain.rs @@ -27,7 +27,7 @@ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecod /// A codec chain is a sequence of array to array, a bytes to bytes, and a sequence of array to bytes codecs. /// -/// A codec chain partial decoder may insert a cache: [`ArrayPartialDecoderCache`] or [`BytesPartialDecoderCache`]. +/// A codec chain partial decoder may insert a cache. /// For example, the output of the `blosc`/`gzip` codecs should be cached since they read and decode an entire chunk. /// If decoding (i.e. going backwards through a codec chain), then a cache may be inserted /// - following the last codec with [`partial_decoder_decodes_all`](crate::array::codec::CodecTraits::partial_decoder_decodes_all) true, or diff --git a/zarrs/src/array/codec/array_to_bytes/pcodec/pcodec_partial_decoder.rs b/zarrs/src/array/codec/array_to_bytes/pcodec/pcodec_partial_decoder.rs index 21a34b4b..ee4d212e 100644 --- a/zarrs/src/array/codec/array_to_bytes/pcodec/pcodec_partial_decoder.rs +++ b/zarrs/src/array/codec/array_to_bytes/pcodec/pcodec_partial_decoder.rs @@ -12,15 +12,15 @@ use crate::array::{ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecoderTraits}; /// Partial decoder for the `bytes` codec. -pub(crate) struct PcodecPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct PcodecPartialDecoder { + input_handle: Arc, decoded_representation: ChunkRepresentation, } -impl<'a> PcodecPartialDecoder<'a> { +impl PcodecPartialDecoder { /// Create a new partial decoder for the `bytes` codec. pub(crate) fn new( - input_handle: Arc, + input_handle: Arc, decoded_representation: ChunkRepresentation, ) -> Self { Self { @@ -101,7 +101,7 @@ fn do_partial_decode<'a>( Ok(decoded_bytes) } -impl ArrayPartialDecoderTraits for PcodecPartialDecoder<'_> { +impl ArrayPartialDecoderTraits for PcodecPartialDecoder { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/array_to_bytes/vlen/vlen_partial_decoder.rs b/zarrs/src/array/codec/array_to_bytes/vlen/vlen_partial_decoder.rs index 588c308f..31d3b4cd 100644 --- a/zarrs/src/array/codec/array_to_bytes/vlen/vlen_partial_decoder.rs +++ b/zarrs/src/array/codec/array_to_bytes/vlen/vlen_partial_decoder.rs @@ -18,18 +18,18 @@ use crate::{ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecoderTraits}; /// Partial decoder for the `bytes` codec. -pub(crate) struct VlenPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct VlenPartialDecoder { + input_handle: Arc, decoded_representation: ChunkRepresentation, index_codecs: Arc, data_codecs: Arc, index_data_type: VlenIndexDataType, } -impl<'a> VlenPartialDecoder<'a> { +impl VlenPartialDecoder { /// Create a new partial decoder for the `bytes` codec. pub(crate) fn new( - input_handle: Arc, + input_handle: Arc, decoded_representation: ChunkRepresentation, index_codecs: Arc, data_codecs: Arc, @@ -95,7 +95,7 @@ fn decode_vlen_bytes<'a>( } } -impl ArrayPartialDecoderTraits for VlenPartialDecoder<'_> { +impl ArrayPartialDecoderTraits for VlenPartialDecoder { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/array_to_bytes/vlen_v2/vlen_v2_partial_decoder.rs b/zarrs/src/array/codec/array_to_bytes/vlen_v2/vlen_v2_partial_decoder.rs index e91a92f6..59f99c4f 100644 --- a/zarrs/src/array/codec/array_to_bytes/vlen_v2/vlen_v2_partial_decoder.rs +++ b/zarrs/src/array/codec/array_to_bytes/vlen_v2/vlen_v2_partial_decoder.rs @@ -14,15 +14,15 @@ use crate::array::{ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecoderTraits}; /// Partial decoder for the `bytes` codec. -pub(crate) struct VlenV2PartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct VlenV2PartialDecoder { + input_handle: Arc, decoded_representation: ChunkRepresentation, } -impl<'a> VlenV2PartialDecoder<'a> { +impl VlenV2PartialDecoder { /// Create a new partial decoder for the `bytes` codec. pub(crate) fn new( - input_handle: Arc, + input_handle: Arc, decoded_representation: ChunkRepresentation, ) -> Self { Self { @@ -54,7 +54,7 @@ fn decode_vlen_bytes<'a>( } } -impl ArrayPartialDecoderTraits for VlenV2PartialDecoder<'_> { +impl ArrayPartialDecoderTraits for VlenV2PartialDecoder { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/array_to_bytes/zfp/zfp_partial_decoder.rs b/zarrs/src/array/codec/array_to_bytes/zfp/zfp_partial_decoder.rs index 05b448d3..92b7dfa6 100644 --- a/zarrs/src/array/codec/array_to_bytes/zfp/zfp_partial_decoder.rs +++ b/zarrs/src/array/codec/array_to_bytes/zfp/zfp_partial_decoder.rs @@ -18,17 +18,17 @@ use crate::array::codec::{AsyncArrayPartialDecoderTraits, AsyncBytesPartialDecod use super::{zarr_to_zfp_data_type, zfp_decode, ZfpMode}; /// Partial decoder for the `zfp` codec. -pub(crate) struct ZfpPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct ZfpPartialDecoder { + input_handle: Arc, decoded_representation: ChunkRepresentation, mode: ZfpMode, write_header: bool, } -impl<'a> ZfpPartialDecoder<'a> { +impl ZfpPartialDecoder { /// Create a new partial decoder for the `zfp` codec. pub(crate) fn new( - input_handle: Arc, + input_handle: Arc, decoded_representation: &ChunkRepresentation, mode: ZfpMode, write_header: bool, @@ -48,7 +48,7 @@ impl<'a> ZfpPartialDecoder<'a> { } } -impl ArrayPartialDecoderTraits for ZfpPartialDecoder<'_> { +impl ArrayPartialDecoderTraits for ZfpPartialDecoder { fn data_type(&self) -> &DataType { self.decoded_representation.data_type() } diff --git a/zarrs/src/array/codec/bytes_partial_decoder_cache.rs b/zarrs/src/array/codec/bytes_partial_decoder_cache.rs index 634866ea..b584e054 100644 --- a/zarrs/src/array/codec/bytes_partial_decoder_cache.rs +++ b/zarrs/src/array/codec/bytes_partial_decoder_cache.rs @@ -1,6 +1,6 @@ //! A cache for partial decoders. -use std::{borrow::Cow, marker::PhantomData}; +use std::borrow::Cow; use crate::{ array::RawBytes, @@ -13,27 +13,23 @@ use super::{BytesPartialDecoderTraits, CodecError, CodecOptions}; use super::AsyncBytesPartialDecoderTraits; /// A cache for a [`BytesPartialDecoderTraits`] partial decoder. -pub struct BytesPartialDecoderCache<'a> { +pub(crate) struct BytesPartialDecoderCache { cache: Option>, - phantom: PhantomData<&'a ()>, } -impl<'a> BytesPartialDecoderCache<'a> { +impl BytesPartialDecoderCache { /// Create a new partial decoder cache. /// /// # Errors /// Returns a [`CodecError`] if caching fails. - pub fn new( + pub(crate) fn new( input_handle: &dyn BytesPartialDecoderTraits, options: &CodecOptions, ) -> Result { let cache = input_handle .partial_decode(&[ByteRange::FromStart(0, None)], options)? .map(|mut bytes| bytes.remove(0).into_owned()); - Ok(Self { - cache, - phantom: PhantomData, - }) + Ok(Self { cache }) } #[cfg(feature = "async")] @@ -41,22 +37,19 @@ impl<'a> BytesPartialDecoderCache<'a> { /// /// # Errors /// Returns a [`CodecError`] if caching fails. - pub async fn async_new( + pub(crate) async fn async_new( input_handle: &dyn AsyncBytesPartialDecoderTraits, options: &CodecOptions, - ) -> Result, CodecError> { + ) -> Result { let cache = input_handle .partial_decode(&[ByteRange::FromStart(0, None)], options) .await? .map(|mut bytes| bytes.remove(0).into_owned()); - Ok(Self { - cache, - phantom: PhantomData, - }) + Ok(Self { cache }) } } -impl BytesPartialDecoderTraits for BytesPartialDecoderCache<'_> { +impl BytesPartialDecoderTraits for BytesPartialDecoderCache { fn partial_decode( &self, decoded_regions: &[ByteRange], @@ -77,7 +70,7 @@ impl BytesPartialDecoderTraits for BytesPartialDecoderCache<'_> { #[cfg(feature = "async")] #[async_trait::async_trait] -impl AsyncBytesPartialDecoderTraits for BytesPartialDecoderCache<'_> { +impl AsyncBytesPartialDecoderTraits for BytesPartialDecoderCache { async fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/blosc/blosc_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/blosc/blosc_partial_decoder.rs index cb7fd772..c6e7c5ef 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/blosc/blosc_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/blosc/blosc_partial_decoder.rs @@ -17,17 +17,17 @@ use crate::array::codec::AsyncBytesPartialDecoderTraits; use super::{blosc_decompress_bytes_partial, blosc_typesize, blosc_validate}; /// Partial decoder for the `blosc` codec. -pub(crate) struct BloscPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct BloscPartialDecoder { + input_handle: Arc, } -impl<'a> BloscPartialDecoder<'a> { - pub(crate) fn new(input_handle: Arc) -> Self { +impl BloscPartialDecoder { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for BloscPartialDecoder<'_> { +impl BytesPartialDecoderTraits for BloscPartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/bz2/bz2_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/bz2/bz2_partial_decoder.rs index 9c20758d..6a236b46 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/bz2/bz2_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/bz2/bz2_partial_decoder.rs @@ -14,17 +14,17 @@ use crate::{ use crate::array::codec::AsyncBytesPartialDecoderTraits; /// Partial decoder for the `bz2` codec. -pub(crate) struct Bz2PartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct Bz2PartialDecoder { + input_handle: Arc, } -impl<'a> Bz2PartialDecoder<'a> { - pub(crate) fn new(input_handle: Arc) -> Self { +impl Bz2PartialDecoder { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for Bz2PartialDecoder<'_> { +impl BytesPartialDecoderTraits for Bz2PartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/crc32c/crc32c_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/crc32c/crc32c_partial_decoder.rs index b4994143..10814b2a 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/crc32c/crc32c_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/crc32c/crc32c_partial_decoder.rs @@ -14,18 +14,18 @@ use crate::array::codec::AsyncBytesPartialDecoderTraits; use super::CHECKSUM_SIZE; /// Partial decoder for the `crc32c` (CRC32C checksum) codec. -pub(crate) struct Crc32cPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct Crc32cPartialDecoder { + input_handle: Arc, } -impl<'a> Crc32cPartialDecoder<'a> { +impl Crc32cPartialDecoder { /// Create a new partial decoder for the `crc32c` codec. - pub(crate) fn new(input_handle: Arc) -> Self { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for Crc32cPartialDecoder<'_> { +impl BytesPartialDecoderTraits for Crc32cPartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/gdeflate/gdeflate_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/gdeflate/gdeflate_partial_decoder.rs index 39f3e2e7..7bbc170a 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/gdeflate/gdeflate_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/gdeflate/gdeflate_partial_decoder.rs @@ -14,18 +14,18 @@ use crate::array::codec::AsyncBytesPartialDecoderTraits; use super::gdeflate_decode; /// Partial decoder for the `gdeflate` codec. -pub(crate) struct GDeflatePartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct GDeflatePartialDecoder { + input_handle: Arc, } -impl<'a> GDeflatePartialDecoder<'a> { +impl GDeflatePartialDecoder { /// Create a new partial decoder for the `gdeflate` codec. - pub(crate) fn new(input_handle: Arc) -> Self { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for GDeflatePartialDecoder<'_> { +impl BytesPartialDecoderTraits for GDeflatePartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/gzip/gzip_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/gzip/gzip_partial_decoder.rs index 2738be49..2ee53dcb 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/gzip/gzip_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/gzip/gzip_partial_decoder.rs @@ -18,18 +18,18 @@ use crate::{ use crate::array::codec::AsyncBytesPartialDecoderTraits; /// Partial decoder for the `gzip` codec. -pub(crate) struct GzipPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct GzipPartialDecoder { + input_handle: Arc, } -impl<'a> GzipPartialDecoder<'a> { +impl GzipPartialDecoder { /// Create a new partial decoder for the `gzip` codec. - pub(crate) fn new(input_handle: Arc) -> Self { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for GzipPartialDecoder<'_> { +impl BytesPartialDecoderTraits for GzipPartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/test_unbounded/test_unbounded_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/test_unbounded/test_unbounded_partial_decoder.rs index 5981fec6..e8326c08 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/test_unbounded/test_unbounded_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/test_unbounded/test_unbounded_partial_decoder.rs @@ -12,18 +12,18 @@ use crate::{ use crate::array::codec::AsyncBytesPartialDecoderTraits; /// Partial decoder for the `test_unbounded` codec. -pub(crate) struct TestUnboundedPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct TestUnboundedPartialDecoder { + input_handle: Arc, } -impl<'a> TestUnboundedPartialDecoder<'a> { +impl TestUnboundedPartialDecoder { /// Create a new partial decoder for the `test_unbounded` codec. - pub(crate) fn new(input_handle: Arc) -> Self { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for TestUnboundedPartialDecoder<'_> { +impl BytesPartialDecoderTraits for TestUnboundedPartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange], diff --git a/zarrs/src/array/codec/bytes_to_bytes/zstd/zstd_partial_decoder.rs b/zarrs/src/array/codec/bytes_to_bytes/zstd/zstd_partial_decoder.rs index b29787a6..5d84168a 100644 --- a/zarrs/src/array/codec/bytes_to_bytes/zstd/zstd_partial_decoder.rs +++ b/zarrs/src/array/codec/bytes_to_bytes/zstd/zstd_partial_decoder.rs @@ -14,18 +14,18 @@ use crate::{ use crate::array::codec::AsyncBytesPartialDecoderTraits; /// Partial decoder for the `zstd` codec. -pub(crate) struct ZstdPartialDecoder<'a> { - input_handle: Arc, +pub(crate) struct ZstdPartialDecoder { + input_handle: Arc, } -impl<'a> ZstdPartialDecoder<'a> { +impl ZstdPartialDecoder { /// Create a new partial decoder for the `zstd` codec. - pub(crate) fn new(input_handle: Arc) -> Self { + pub(crate) fn new(input_handle: Arc) -> Self { Self { input_handle } } } -impl BytesPartialDecoderTraits for ZstdPartialDecoder<'_> { +impl BytesPartialDecoderTraits for ZstdPartialDecoder { fn partial_decode( &self, decoded_regions: &[ByteRange],