pub struct PackedReader { /* private fields */ }Expand description
Reader for a local packed dataset. Remote/HTTP reads are the TS reader’s job; this opens objects from the filesystem.
Mirrors ArchiveReader: entries returns
the decoded v5 directory, metadata the folded metadata,
and read_payload selects the entry’s pack, slices
[offset..offset+length], verifies CRC32C and decompresses the per-blob
zstd. Packs are mmap’d lazily by pack_id.
Implementations§
Source§impl PackedReader
impl PackedReader
Sourcepub fn open<P: AsRef<Path>>(manifest_path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(manifest_path: P) -> Result<Self>
Open a packed dataset by its manifest.json path. The directory and pack
objects are resolved relative to the manifest’s parent directory.
Sourcepub fn entries(&self) -> &[TileEntry]
pub fn entries(&self) -> &[TileEntry]
All directory entries (sorted by zoom then Hilbert index).
Sourcepub fn read_payload(&self, entry: &TileEntry) -> Result<Vec<u8>>
pub fn read_payload(&self, entry: &TileEntry) -> Result<Vec<u8>>
Read and decompress a tile’s raw payload bytes, verifying its CRC32C.
Selects the pack by entry.pack_id, slices [offset..offset+length]
within it, checks the CRC, then decompresses the per-blob zstd. Mirrors
ArchiveReader::read_payload.
Sourcepub fn read_layers(&self, entry: &TileEntry) -> Result<Vec<DecodedLayer>>
pub fn read_layers(&self, entry: &TileEntry) -> Result<Vec<DecodedLayer>>
Read and decode a tile into its Arrow layers.
Auto Trait Implementations§
impl !RefUnwindSafe for PackedReader
impl !Sync for PackedReader
impl Freeze for PackedReader
impl Send for PackedReader
impl Unpin for PackedReader
impl UnsafeUnpin for PackedReader
impl UnwindSafe for PackedReader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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