Skip to main content

Bit-level Reed-Solomon / BCH / CRC error-correcting codes (IT++ wrapper) with bit-vector I/O

Project description

verda-ecc

Bit-level Reed-Solomon / BCH / CRC error-correcting codes with native bit-vector (bvec) I/O, wrapping IT++ via pybind11. Built as a self-contained wheel (IT++ + OpenBLAS statically linked) — no system libitpp, no patchelf, no per-Python .so checked into git.

Why not a byte-oriented ECC library?

The Verda watermark encodes/decodes on non-byte-aligned codeword lengths (e.g. 31- and 127-bit BCH) and needs bit-error correction, not byte-symbol correction. Mainstream libraries operate on byte symbols: reedsolo is GF(2^8), bchlib takes bytearrays, crcmod produces byte CRCs. IT++ provides true bit-vector coding, so we wrap the known-good IT++ implementation rather than reimplement.

API

from verda_ecc import ECCHandler

ecc = ECCHandler()
cw  = ecc.bch_encode(bits, n=127, t=6)      # numpy int32 bit-array in/out
msg = ecc.bch_decode(cw, n=127, t=6)
cw  = ecc.rs_encode(bits, m=5, t=7)
crc = ecc.crc_encode(bits, crc_len=16)

Composites: encode_with_crc_and_{bch,rs} / decode_with_{bch,rs}_and_crc.

Bit-identical guarantee

tests/golden.json freezes the deployed IT++ build's exact output for every parameter set. tests/test_golden.py asserts a fresh build reproduces it byte-for-byte (encode + decode round-trips). The wheel does not ship unless this passes — the acceptance gate against silent build drift.

License

GPL-3.0-or-later (inherited from IT++). Pure coding theory; no Verda IP.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verda_ecc-0.1.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

verda_ecc-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

verda_ecc-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file verda_ecc-0.1.0.tar.gz.

File metadata

  • Download URL: verda_ecc-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for verda_ecc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c7fd86e7bfcbe8e1509982cb5bd54898a8868e2008721a82041e7e8463e38207
MD5 368cb2d630b6c7134a830e2a8654d911
BLAKE2b-256 1041be38d2a2e8ecd63158879ef4bba90cef543a55755ee4791a12a5a758700a

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00eb003c03a061c9758080ec9b456e940498df7900a0e90c46df93e946c579df
MD5 4b473001d99e5937c4df90ac706a565a
BLAKE2b-256 a3633a70eb23eab06b2c828a6755770a6ebdbf140f44f9345b0fcfd0fe8e8b58

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 65fc355ae576f675d326b1ae6b2c5a0302791071b6109c23946dc6f14d9339de
MD5 f9960f138a7e375be32e430a38335fd3
BLAKE2b-256 cbde4c2b1ac6600a9e911f02905773ec5ff0b16fb2086f429a0a9de29364da85

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22dda9f4325fa53b9949e0039479af377a954bdef2a62c7aa16aad407cf2d6ae
MD5 c58f331c6665d6c894534171c9826ef6
BLAKE2b-256 beb69d40a4f6cefc78e8ecc6866745ef51e3a97f9175d7552218e7588c9473dd

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c80e2b995efbaa3e41e344febf366c6ebb3b5d34a865a4e0fde8434c2a111d3c
MD5 93aa8d56479b27f92f568e6e7234a59b
BLAKE2b-256 d70e459360fee5a661da6b889d7921a4fcf0424b90e3d1f3959af4e0d7451bba

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5419aedf53d84118f1f40d5f603a56bde4697c31766ace8dcfb4352100964115
MD5 5ea74885aa983b097f910f0b3656b6b3
BLAKE2b-256 ae5831898678987133de93ac516ebe2b3f18a280e953deae405e1e210ec263dd

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4df42ce6505607c996c6612f429491da911f6ffc820947130dd475ea4e6b0df2
MD5 02691848e4123eeee249fd73b0c073cd
BLAKE2b-256 52a06bbf9790b951a8e1225cbe501d30965befa94b39d3a6346f198e3ee15a33

See more details on using hashes here.

File details

Details for the file verda_ecc-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verda_ecc-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ffd2852cecf0336bd656c7884750b1855c55dc67f0f0b4b8513a61815555dd9
MD5 a1360ef85048301a57c17bfc2663013c
BLAKE2b-256 daeb876530ccffb806eb147a0f995190b33d6507003358a7d4d7c2eb3293a988

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page