Module ffi

Module ffi 

Source

Constants§

LERC_VERSION_MAJOR
LERC_VERSION_MINOR
LERC_VERSION_PATCH

Functions§

lerc_computeCompressedSize
! The image or mask of valid pixels is optional. Nullptr means all pixels are valid. ! If not all pixels are valid, set invalid pixel bytes to 0, valid pixel bytes to 1. ! Size of the valid / invalid pixel image is (nCols * nRows * nMasks).
lerc_computeCompressedSizeForVersion
! Use the 2 functions below to encode to an older codec version
lerc_computeCompressedSize_4D
! Encode functions: ! ! If you don’t use a noData value, are fine with the byte masks, just pass nullptr for the last 2 arguments. ! ! If you do have noData values at pixels that are marked as valid pixels by the byte mask, ! pass 2 arrays of size nBands each, one value per band. ! In pUsesNoData array, for each band, pass 1 for noData value is used, 0 if not. ! In noDataValues array, for each band, pass the noData value if there is one.
lerc_decode
lerc_decodeToDouble
! Same as above, but decode into double array independent of compressed data type. ! Wasteful in memory, but convenient if a caller from Python or C# does not want to deal with ! data type conversion, templating, or casting. ! Should this api be extended to new data types that don’t fit into a double such as int64, ! then this function will fail for such compressed data types.
lerc_decodeToDouble_4D
lerc_decode_4D
lerc_encode
! Encode the input data into a compressed Lerc blob.
lerc_encodeForVersion
lerc_encode_4D
lerc_getBlobInfo
lerc_getDataRanges

Type Aliases§

lerc_status
! Added in version 4.0: ! ! - 1) better support 3D and 4D data, allow for lossy encoding even if a noData value is used ! - 2) better lossless compression for float and double (pass maxZError = 0) ! - 3) allow to pass integer > 32 bit as double (Lerc detects it is all integer and uses that) ! - 4) renamed nDim to nDepth (without changing the function signatures) ! ! More on 1). In version 3.0, for 2D images, the 2D valid / invalid byte masks represent invalid pixels. ! For more than 1 band, different masks per band can be used. No change to that. ! For nDepth > 1, or an array of values per pixel, there is the special case of a mix of valid and invalid values ! at the same pixel. The 2D mask cannot cover this case. ! We have added 4 new functions to version 4.0 to cover this case, see below. If you don’t encounter this ! “mixed case”, you can continue using the same API functions as in version 3.0. ! If you should encounter a Lerc blob that has this mix, both the regular lerc_decode() and ! lerc_getDataRanges() functions will fail with “ErrCode::HasNoData”. ! In that case, you need to call the new lerc_decode_4D() function. ! ! More on 2). Better lossless compression for float and double is enabled for all API functions. ! For 1) and 3) you have to call the new “…_4D()” functions, see further below.