Replies: 1 comment
-
I think a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed during the overhaul of
DecodeOptions
that there doesn't seem to be a way to reuseDecoder
allocations and settings if a user has multiple images to read. TheDecoder
allocates aReadDecoder
, and theStreamingDecoder
allocates aZlibStream
which is whereDecodeOptions
resides.Perhaps a
Reader::into_raw_parts
can be added that returns aStreamingDecoder
and the threeVec<u8>
s. ADecoder::new_from_raw
could be built with a resetStreamingDecoder
, and theReader
can reuse allocations withDecoder::read_info_with_raw_parts(mut self, ReusedVecs) -> Result<Reader<R>>
.I'm not 100% certain on this idea (maybe
Decoder
andReader
should be merged into one?), just some preliminary thoughts I wanted to share while fresh in my mind.Struct definitions and the
ZlibStream
initialization which includes some large capacity VecsBeta Was this translation helpful? Give feedback.
All reactions