pub struct ArchiveReader { /* private fields */ }Expand description
Reader for an STT archive.
The archive file is memory-mapped on open; tile payload reads serve slices
directly out of the mapping rather than allocating + pread-ing a fresh
Vec<u8> per call. For warm caches this is allocation-free.
Implementations§
Source§impl ArchiveReader
impl ArchiveReader
Sourcepub fn header(&self) -> &ArchiveHeader
pub fn header(&self) -> &ArchiveHeader
Parsed header.
Sourcepub fn dictionary(&self) -> Option<&[u8]>
pub fn dictionary(&self) -> Option<&[u8]>
Shared zstd dictionary, if the archive ships one.
Sourcepub fn entries(&self) -> &[TileEntry]
pub fn entries(&self) -> &[TileEntry]
All directory entries (sorted by zoom then Hilbert index).
Sourcepub fn tiles_at_time(&self, t: i64) -> Vec<&TileEntry>
pub fn tiles_at_time(&self, t: i64) -> Vec<&TileEntry>
Directory entries of every tile whose interval contains time t.
Sourcepub fn find_tile(&self, zoom: u8, x: u32, y: u32, t: i64) -> Option<&TileEntry>
pub fn find_tile(&self, zoom: u8, x: u32, y: u32, t: i64) -> Option<&TileEntry>
Look up one tile by exact (zoom, x, y, time).
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.
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 Freeze for ArchiveReader
impl RefUnwindSafe for ArchiveReader
impl Send for ArchiveReader
impl Sync for ArchiveReader
impl Unpin for ArchiveReader
impl UnsafeUnpin for ArchiveReader
impl UnwindSafe for ArchiveReader
Blanket Implementations§
impl<T> Allocation for T
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
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>
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