--- id: pyjpegls version: "1.5.1" license: MIT license_treatment: permissive maintenance: aging --- # pyjpegls — JPEG-LS for Python via CharLS C++ Library License: permissive · Maintenance: aging · Downloads: 119.1K/mo ## What it is and what it does pyjpegls is a Python wrapper around the CharLS C++ library that implements the JPEG-LS lossless image compression standard (ISO-14495-1/ITU-T.87). It provides encode() and decode() functions to compress numpy arrays to byte buffers and decompress them back losslessly. The package was forked from the unmaintained CharPyLS project to maintain compatibility with modern Python versions and add fixes. The typical workflow is to read image data into a numpy array, call encode() to compress it to a buffer, and call decode() to restore the original array bit-for-bit. JPEG-LS is designed for low-complexity lossless compression and is often used in medical imaging and scientific applications where data fidelity is critical. The package depends only on numpy at runtime; Cython and Pillow are build-time or test-time dependencies. Use it for: - Compress greyscale or RGB image data in memory for storage or transmission when lossless fidelity is required. - Integrate JPEG-LS compression into medical imaging pipelines where the standard is widely used. - Benchmark or compare JPEG-LS compression ratios and speed against other lossless formats in scientific research. - Reduce memory footprint of large image datasets by compressing numpy arrays before serialization or caching. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Encodes and decodes image data using the JPEG-LS lossless compression algorithm via the CharLS C++ library, producing compressed byte buffers that can be round-tripped with numpy arrays. Yes, if you need lossless JPEG-LS compression in Python and are comfortable with a package in aging maintenance. The library is stable (Production/Stable classifier), has no known vulnerabilities, and pre-built wheels make installation straightforward on common platforms. However, verify that the fork remains compatible with your use case and that the 655-day release gap does not signal abandonment; check the repository's recent activity and open issues before committing to a production dependency. ## Install pip install pyjpegls uv add pyjpegls poetry add pyjpegls ## Installing pyjpegls Before you install: Medium install friction due to compiled C++ extension; pre-built wheels are available for Python 3.9, 3.10, 3.11, 3.12, and 3.13 on Windows, macOS (x86_64 and ARM64), and Linux (x86_64 and aarch64), so installation is straightforward on supported platforms. Maintenance status is aging—last release was 655 days ago, though the repository is not archived and received a commit on 2025-12-07. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: import numpy import pyjpegls # Compress a numpy array to bytes data = numpy.zeros((10, 10, 3), dtype=numpy.uint8) compressed = pyjpegls.encode(data) # Decompress back to numpy array decompressed = pyjpegls.decode(compressed) Requires numpy; C++ extension wheels are available for Python 3.9–3.13 on common platforms (Windows, macOS, Linux). Verify before relying: - Whether the package is actively maintained or if the 655-day gap since last release indicates stalled development despite recent repo activity. - Performance characteristics and compression ratio compared to PNG, JPEG 2000, or other lossless formats in typical use. - Whether the fork from the original CharPyLS repository has addressed specific bugs or limitations beyond keeping it installable. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 119.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags lossless image compression, jpeg-ls encoder decoder, image data compression python, charls wrapper, numpy image compression, lossless jpeg alternative, image-compression, lossless-codec, medical-imaging [View on SkillFed](https://skillfed.io/packages/pyjpegls) · [View on PyPI](https://pypi.org/project/pyjpegls/)