Skip to content

feat(rc-zip-sync): make EntryReader public #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rc-zip-sync/src/entry_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use rc_zip::{
use std::io;
use tracing::trace;

pub(crate) struct EntryReader<R>
/// Reader for an entry inside an archive
pub struct EntryReader<R>
where
R: io::Read,
{
Expand Down
1 change: 1 addition & 0 deletions rc-zip-sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub use streaming_entry_reader::StreamingEntryReader;

// re-exports
pub use rc_zip;
pub use entry_reader::EntryReader;
pub use read_zip::{
ArchiveHandle, EntryHandle, HasCursor, ReadZip, ReadZipStreaming, ReadZipWithSize,
};
2 changes: 1 addition & 1 deletion rc-zip-sync/src/read_zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ where
F: HasCursor,
{
/// Returns a reader for the entry.
pub fn reader(&self) -> impl Read + 'a {
pub fn reader(&self) -> EntryReader<<F as HasCursor>::Cursor<'a>> {
EntryReader::new(self.entry, self.file.cursor_at(self.entry.header_offset))
}

Expand Down