pub struct ZipStreamReader { /* private fields */ }Expand description
流式读取器,用于处理超大文件 这是一个基于预读取的高效实现,避免了重复跳跃的性能问题
Implementations§
Source§impl ZipStreamReader
impl ZipStreamReader
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
获取总大小
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
是否已完成读取
Sourcepub fn process_chunks<F>(&mut self, processor: F) -> Result<()>
pub fn process_chunks<F>(&mut self, processor: F) -> Result<()>
逐块处理数据
Sourcepub fn read_all_streaming(&mut self) -> Result<Vec<u8>>
pub fn read_all_streaming(&mut self) -> Result<Vec<u8>>
流式读取所有数据到 Vec(适用于需要完整数据的场景)
Auto Trait Implementations§
impl Freeze for ZipStreamReader
impl RefUnwindSafe for ZipStreamReader
impl Send for ZipStreamReader
impl Sync for ZipStreamReader
impl Unpin for ZipStreamReader
impl UnwindSafe for ZipStreamReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more