pub struct CodestreamIndex {
pub main_head_start: i64,
pub main_head_end: i64,
pub codestream_size: u64,
pub markers: Vec<MarkerInfo>,
pub tiles: Vec<CodestreamTileIndex>,
}Expand description
Owned codestream index (marker/tile-part/packet layout of a decoded
codestream; Decoder::cstr_index).
Fields§
§main_head_start: i64Byte offset of the start of the main header (the SOC marker).
main_head_end: i64Byte offset of the end of the main header (the first SOD marker).
codestream_size: u64Total codestream size in bytes.
markers: Vec<MarkerInfo>Main-header markers.
tiles: Vec<CodestreamTileIndex>Per-tile indexes.
Implementations§
Source§impl CodestreamIndex
impl CodestreamIndex
Sourcepub fn packets(&self) -> impl Iterator<Item = &PacketInfo>
pub fn packets(&self) -> impl Iterator<Item = &PacketInfo>
All packet entries of all tiles, in tile order.
Sourcepub fn layer_byte_thresholds(&self) -> Vec<u64>
pub fn layer_byte_thresholds(&self) -> Vec<u64>
The smallest stream prefix length (bytes, absolute file offsets)
needed to fully decode each quality layer: entry i is the maximum
packet end position over all packets with layno <= i, so decoding
a prefix of that length (or longer) yields all packets of layers
1..=i+1. The vector’s length is the codestream’s layer count;
the last entry equals the codestream size for a complete file.
Source§impl CodestreamIndex
impl CodestreamIndex
Sourcepub fn markers(&self) -> &[MarkerInfo]
pub fn markers(&self) -> &[MarkerInfo]
The main-header markers.
Sourcepub fn tile_indices(&self) -> &[CodestreamTileIndex]
pub fn tile_indices(&self) -> &[CodestreamTileIndex]
The per-tile indexes.
Trait Implementations§
Source§impl Clone for CodestreamIndex
impl Clone for CodestreamIndex
Source§fn clone(&self) -> CodestreamIndex
fn clone(&self) -> CodestreamIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodestreamIndex
impl Debug for CodestreamIndex
Source§impl Default for CodestreamIndex
impl Default for CodestreamIndex
Source§fn default() -> CodestreamIndex
fn default() -> CodestreamIndex
Auto Trait Implementations§
impl Forget for CodestreamIndex
impl Freeze for CodestreamIndex
impl Move for CodestreamIndex
impl RefUnwindSafe for CodestreamIndex
impl Send for CodestreamIndex
impl Sync for CodestreamIndex
impl Unpin for CodestreamIndex
impl UnsafeUnpin for CodestreamIndex
impl UnwindSafe for CodestreamIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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