Skip to main content

Crate lerc_core

Crate lerc_core 

Source
Expand description

Shared types and errors for pure-Rust LERC codecs.

Macros§

dispatch_data_type
Dispatches a runtime DataType to a concrete primitive type alias.

Structs§

BandSetInfo
Validated metadata for a concatenated set of same-shaped LERC bands.
BandSetView
Borrowed, dimension-checked view of a multi-band raster.
BlobInfo
Validated metadata for one LERC blob.
MaskView
Borrowed, dimension-checked validity mask; zero is invalid and nonzero is valid.
RasterView
Borrowed, dimension-checked view of one pixel-interleaved raster band.

Enums§

BandLayout
Memory layout for a multi-band raster.
DataType
Primitive numeric representations supported by the LERC format.
Error
Errors returned while validating, decoding, or encoding LERC data.
MaskEncoding
How a decoded blob represents pixel validity.
PixelData
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 f64 through 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 * height using 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 f64 values.
read_values_as
Decodes little-endian samples and converts them directly to T.
sample_count_from_dims
Computes width * height * depth using 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.