skillfed

reedsolo

Pure-Python Reed Solomon encoder/decoder

reedsolo v1.7.0 2.8M downloads/30d#2,879 on PyPI418
Permissive license Public Domain Active released

What it is and what it does

Reedsolo is a Reed-Solomon error-correction codec that protects data from corruption by adding redundancy symbols. It works with bytes and burst-type errors (common in storage media like hard drives) rather than bit-level noise. The library offers both a pure-Python implementation and an optional Cython-accelerated version for performance-critical use.

You initialize a codec with a number of error-correction symbols, then encode data by appending those symbols, and decode by passing potentially corrupted data back to recover the original. The codec can correct up to half as many errors as you have correction symbols, or twice as many erasures if you know which positions are corrupted. It's designed for data-at-rest scenarios (backup, archival, storage) rather than streaming or network transmission.

Use it for:

  • Protect archived files from bitrot by encoding with Reed-Solomon and storing the result on unreliable media
  • Add redundancy to backup data so that a few corrupted sectors can be automatically repaired
  • Implement erasure coding for distributed storage where some replicas may be lost or damaged
  • Verify data integrity without decoding by using the check() method on received or stored messages
  • Correct errors in QR codes or other burst-error-prone encoded data formats

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes and decodes data using Reed-Solomon error correction to detect and repair burst errors, supporting both pure Python and optional Cython-optimized implementations.

Yes. Reedsolo is mature, actively maintained, has no dependencies, and is permissively licensed. Install it if you need to protect stored or transmitted data from burst errors and want a straightforward, well-tested implementation. The pure-Python version is fast enough for most use cases; the optional Cython build is available if you need more speed.

Install

reedsolo on PyPI

pip

pip install reedsolo

uv

uv add reedsolo

poetry

poetry add reedsolo

Installing reedsolo

Before you install

Low friction: pure-Python wheel with no runtime dependencies. Maintenance is active with recent commits; the library is mature (Development Status 6) and has been stable since its 2012 release.

License in practice

Public Domain license with permissive treatment; you may use, modify, and distribute freely without attribution requirements.

Quickstart

pip install reedsolo

from reedsolo import RSCodec
rsc = RSCodec(10)  # 10 error correction symbols
encoded = rsc.encode(b'hello world')
decoded_msg, _, _ = rsc.decode(encoded)
print(decoded_msg)

Verify before relying

  • Whether the optional Cython build significantly improves performance for typical workloads
  • Maximum practical message length before performance degrades
  • Real-world bitrot detection rates compared to checksums or hashing

Package facts

License Public Domain (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 1,305 days since the last release
Last repo commit
First released
Downloads 2,814,392/month — #2,879 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: reedsolo-1.7.0-py3-none-any.whl

Development Status :: 6 - MatureIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT No Attribution License (MIT-0)License :: OSI Approved :: The Unlicense (Unlicense)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: CythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: CommunicationsTopic :: Scientific/Engineering :: MathematicsTopic :: System :: Archiving :: BackupTopic :: System :: Recovery Tools

Tags

reed solomon error correctiondata recovery from corruptionburst error correctionbitrot protectionerasure coding libraryerror detection and repairgalois field codec
error-correctiondata-integritystorage-protection

More Mathematics packages