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
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed during the overhaul of
DecodeOptionsthat there doesn't seem to be a way to reuseDecoderallocations and settings if a user has multiple images to read. TheDecoderallocates aReadDecoder, and theStreamingDecoderallocates aZlibStreamwhich is whereDecodeOptionsresides.Perhaps a
Reader::into_raw_partscan be added that returns aStreamingDecoderand the threeVec<u8>s. ADecoder::new_from_rawcould be built with a resetStreamingDecoder, and theReadercan reuse allocations withDecoder::read_info_with_raw_parts(mut self, ReusedVecs) -> Result<Reader<R>>.I'm not 100% certain on this idea (maybe
DecoderandReadershould be merged into one?), just some preliminary thoughts I wanted to share while fresh in my mind.Struct definitions and the
ZlibStreaminitialization which includes some large capacity VecsBeta Was this translation helpful? Give feedback.
All reactions