Expand description
Pure Rust implementation of the LERC (Limited Error Raster Compression) format.
Supports encoding and decoding of raster images with configurable lossy or lossless compression. Compatible with ESRI’s LERC2 format specification.
Re-exports§
Modules§
- bitmask
- Validity bitmask for tracking valid/invalid pixels.
- checksum
- Fletcher-32 checksum used by the LERC2 format.
- error
- Error types for LERC encoding and decoding.
- types
- Pixel data types and the
Sampletrait for type-safe encoding/decoding.
Structs§
- Decode
Result - Metadata returned from a decode-into operation (no owned pixel data).
- Decoded
Slice - Decoded pixel data and metadata returned by
decode_slice. - Image
- A decoded raster image with pixel data and validity masks.
- Lerc
Info - Header metadata extracted from a LERC blob without decoding pixel data.
Enums§
- Precision
- Controls the precision/error tolerance for LERC encoding.
- Sample
Data - Type-erased pixel data container, one variant per supported data type.
Functions§
- decode
- Decode a LERC blob, returning the image with pixel data and validity masks.
- decode_
info - Read header metadata from a LERC blob without decoding pixel data.
- decode_
into - Decode a LERC blob into a pre-allocated buffer, returning metadata.
- decode_
into_ with_ nodata - Decode a LERC blob into a pre-allocated buffer, filling invalid pixels with a caller-supplied sentinel value.
- decode_
slice - Decode a single-band, single-depth LERC blob into a
DecodedSlice<T>containing the typed pixel data, validity mask, and image dimensions. - encode
- Encode an image into a LERC blob with the given precision.
- encode_
borrowed - Zero-copy multi-band encode entry point.
- encode_
slice - Encode a single-band image with all pixels valid.
- encode_
slice_ masked - Encode a single-band image with a validity mask.