Expand description
Shared types and errors for pure-Rust LERC codecs.
Macros§
- dispatch_
data_ type - Dispatches a runtime
DataTypeto a concrete primitive type alias.
Structs§
- Band
SetInfo - Validated metadata for a concatenated set of same-shaped LERC bands.
- Band
SetView - Borrowed, dimension-checked view of a multi-band raster.
- Blob
Info - Validated metadata for one LERC blob.
- Mask
View - Borrowed, dimension-checked validity mask; zero is invalid and nonzero is valid.
- Raster
View - Borrowed, dimension-checked view of one pixel-interleaved raster band.
Enums§
- Band
Layout - Memory layout for a multi-band raster.
- Data
Type - Primitive numeric representations supported by the LERC format.
- Error
- Errors returned while validating, decoding, or encoding LERC data.
- Mask
Encoding - How a decoded blob represents pixel validity.
- Pixel
Data - Owned homogeneous pixel samples with their runtime numeric type.
- Version
- LERC format family and encoded version number.
Traits§
- Sample
- Primitive sample types supported by LERC.
Functions§
- append_
value_ as - Converts and appends one scalar in the requested little-endian representation.
- bits_
required - Returns the minimum bit width needed to represent
max_index. - coerce_
f64_ to_ data_ type - Rounds or truncates an
f64through the specified primitive representation. - count_
valid_ in_ block - Counts valid mask entries in a rectangular row-major block.
- fletcher32
- Computes the Fletcher-32 checksum variant used by Lerc2.
- output_
value - Converts a decoded value to an output sample while preserving source-type rounding.
- pixel_
count_ from_ dims - Computes
width * heightusing checked, platform-portable arithmetic. - read_
scalar - Reads one little-endian scalar and promotes it to
f64. - read_
typed_ values - Reads an aligned little-endian sample buffer as promoted
f64values. - read_
values_ as - Decodes little-endian samples and converts them directly to
T. - sample_
count_ from_ dims - Computes
width * height * depthusing checked arithmetic. - sample_
index - Computes the pixel-interleaved sample index
pixel * depth + dim. - words_
from_ padded - Converts a byte slice to zero-padded little-endian words.
Type Aliases§
- Result
- Result type used by all LERC crates.