You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a reader myself, but it can only read up to 32K each time. I tried many methods, and tracked for a long time, and finally found that the problem lies here, zip call flate2::bufread::DeflateDecoder::new is 32K:
impl<R:Read>DeflateDecoder<R>{/// Creates a new decoder which will decompress data read from the given/// stream.pubfnnew(r:R) -> DeflateDecoder<R>{DeflateDecoder::new_with_buf(r,vec![0;32*1024])}/// Same as `new`, but the intermediate buffer for data is specified.////// Note that the capacity of the intermediate buffer is never increased,/// and it is recommended for it to be large.pubfnnew_with_buf(r:R,buf:Vec<u8>) -> DeflateDecoder<R>{DeflateDecoder{inner: bufread::DeflateDecoder::new(BufReader::with_buf(buf, r)),}}}
It also provides another interface new_with_buf. But zip does not support it.
The text was updated successfully, but these errors were encountered:
I implemented a reader myself, but it can only read up to 32K each time. I tried many methods, and tracked for a long time, and finally found that the problem lies here, zip call flate2::bufread::DeflateDecoder::new is 32K:
It also provides another interface new_with_buf. But zip does not support it.
The text was updated successfully, but these errors were encountered: