pylerc
Limited Error Raster Compression
Decision gist · record as of 2026-08-14
Yes. pylerc is actively maintained, carries no known vulnerabilities, uses a permissive Apache 2 license, and offers a clean numpy-integrated API for a specialized but well-defined task. Install it if you work with raster imagery and need bounded-error compression; the medium install friction is typical for packages with compiled wheels. Not necessary for general image compression or if your raster format is already standardized in your pipeline.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; numpy must be installed.
- Active maintenance with a recent release (22 days old).
- Medium install friction due to platform-specific wheels; numpy is the sole runtime dependency.
License · maintenance · safety
Apache 2 (permissive) — Apache 2 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-07-23 (22 days) · last repo commit 2026-07-30 · 212 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 173,034 downloads/mo, #10,319 on PyPI
Alternatives
Verify before relying
import pylerc
import numpy as np
# Encode a masked array with max error of 0.1
data = np.ma.array([[1, 2], [3, 4]], mask=[[False, False], [False, True]])
result, n_bytes, blob = pylerc.encode_ma(data, nDepth=1, maxZErr=0.1, nBytesHint=0)
# Decode back
result, decoded_arr, depth, nodata = pylerc.decode_ma(blob)- Whether the 2 GB per-band input and output limits in version 4.2.0 are sufficient for typical use cases.
- Performance characteristics (encoding/decoding speed, compression ratios) compared to other raster formats.
- Compatibility with existing LERC 3.0 blobs and migration path for legacy data.
What it is and what it does
pylerc is a Python binding for LERC, an open-source raster compression format designed for rapid encoding and decoding of image tiles with user-controlled maximum compression error. It works with numpy arrays in 2D, 3D, or 4D shapes, supporting any pixel type from byte to double, and allows marking pixels as invalid via masks, noData values, or NaN. The package offers two main APIs: one using numpy masked arrays (encode_ma/decode_ma) and another using separate data and mask arrays (encode_4D/decode_4D), giving flexibility depending on whether all pixels are valid or sparse masking is needed.
Version 4.2.0 introduces stricter size limits for safety: input data is capped at 2 GB per band, compressed output at 2 GB per band, and total blob size at 4 GB across all bands. The package maintains backward compatibility with LERC 3.0 functions, though mixed valid/invalid cases at the same pixel for multi-band data require the newer API. It is actively maintained, supports current Python versions (3.11–3.14), and carries no known security vulnerabilities.
Use it for
- Compress geospatial satellite or aerial imagery tiles for efficient storage and transmission with bounded error.
- Encode scientific raster data (e.g., elevation models, climate grids) where lossy compression with user-defined error tolerance is acceptable.
- Decode LERC-compressed blobs received from remote APIs or read from disk into numpy arrays for analysis.
- Handle multi-band imagery (e.g., RGB, hyperspectral) with per-band noData values and mixed valid/invalid pixels.
- Benchmark or migrate existing LERC 3.0 workflows to the newer masked-array API for cleaner mask handling.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
pylerc is actively maintained, carries no known vulnerabilities, uses a permissive Apache 2 license, and offers a clean numpy-integrated API for a specialized but well-defined task. Install it if you work with raster imagery and need bounded-error compression; the medium install friction is typical for packages with compiled wheels. Not necessary for general image compression or if your raster format is already standardized in your pipeline.
Install
pylerc on PyPI
Before you install
Active maintenance with a recent release (22 days old). Medium install friction due to platform-specific wheels; numpy is the sole runtime dependency. Supports Python 3.11 through 3.14.
Requires Python 3.11 or later; numpy must be installed.
License in practice
Apache 2 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import pylerc
import numpy as np
# Encode a masked array with max error of 0.1
data = np.ma.array([[1, 2], [3, 4]], mask=[[False, False], [False, True]])
result, n_bytes, blob = pylerc.encode_ma(data, nDepth=1, maxZErr=0.1, nBytesHint=0)
# Decode back
result, decoded_arr, depth, nodata = pylerc.decode_ma(blob)
Verify before relying
- Whether the 2 GB per-band input and output limits in version 4.2.0 are sufficient for typical use cases.
- Performance characteristics (encoding/decoding speed, compression ratios) compared to other raster formats.
- Compatibility with existing LERC 3.0 blobs and migration path for legacy data.
Package facts
| License | Apache 2 permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 173,034 / month, #10,319 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: pylerc-4.2.0-py3-none-macosx_11_0_universal2.whl; pylerc-4.2.0-py3-none-manylinux_2_28_x86_64.whl; pylerc-4.2.0-py3-none-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “raster compression encoding decoding”
- pylercpylerc encodes and decodes raster image data using the LERC (Limited…
- leb128Encodes and decodes integers using LEB128 (Little Endian Base 128), a…
- flexpolylineEncodes and decodes geographic coordinate sequences into a compressed…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also numcodecs · pylzss · pystac-ext-raster · lilcom · rasterio · qoi · pylibjpeg · pyjpegls · rlp