M0LTE.Fec
0.1.0
See the version list below for details.
dotnet add package M0LTE.Fec --version 0.1.0
NuGet\Install-Package M0LTE.Fec -Version 0.1.0
<PackageReference Include="M0LTE.Fec" Version="0.1.0" />
<PackageVersion Include="M0LTE.Fec" Version="0.1.0" />
<PackageReference Include="M0LTE.Fec" />
paket add M0LTE.Fec --version 0.1.0
#r "nuget: M0LTE.Fec, 0.1.0"
#:package M0LTE.Fec@0.1.0
#addin nuget:?package=M0LTE.Fec&version=0.1.0
#tool nuget:?package=M0LTE.Fec&version=0.1.0
M0LTE.Fec
Dependency-free forward-error-correction and checksum primitives for .NET, extracted from the pdn-soundmodem packet-radio modem. Nothing here is radio-specific — it's general-purpose FEC.
| Type | What it is |
|---|---|
ReedSolomon |
Systematic Reed-Solomon codec over GF(2⁸): configurable parity length and first-consecutive-root, LFSR encoder, Berlekamp-Massey + Chien search + Forney decode. |
Crc16X25 |
CRC-16/X.25 (the AX.25 / IL2P FCS variant). |
FreedvCrc16 |
The CRC-16 FreeDV uses (CRC-16/CCITT, check 0x29B1). |
Hamming74 |
Hamming(7,4) single-error-correcting encode/decode. |
GpInterleaver |
Golden-prime block interleaver (ChooseB / Interleave / Deinterleave) over any T. |
- Targets
net10.0. No third-party package dependencies — just the BCL. - Public API is locked by a build-time test and the package follows
Semantic Versioning; see
docs/versioning.md.
Install
dotnet add package M0LTE.Fec
Quick start
using M0LTE.Fec;
// Reed-Solomon: 16 parity bytes over GF(2^8) (corrects up to 8 byte errors).
var rs = new ReedSolomon(paritySymbols: 16);
byte[] data = "hello, world"u8.ToArray();
byte[] parity = new byte[16];
rs.Encode(data, parity); // systematic: data unchanged, parity computed
// ... transmit data + parity, pick up some errors ...
byte[] received = [.. data, .. parity];
int corrected = rs.Decode(received); // returns the number of symbols corrected, or -1 if unrecoverable
// CRC-16/X.25 frame check:
ushort fcs = Crc16X25.Compute(data);
// Hamming(7,4):
byte codeword = Hamming74.Encode(0x0A);
byte nibble = Hamming74.Decode(codeword); // corrects a single bit flip
(Exact constructor/method signatures are in the XML docs shipped with the package.)
Licence
AGPL-3.0-or-later (see LICENSE). The implementations are independent/textbook
(the Reed-Solomon codec is the least derivative component); field/root parameters and the
Hamming/CRC tables come from published standards. See PROVENANCE.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on M0LTE.Fec:
| Package | Downloads |
|---|---|
|
pdn-soundmodem
Headless soundcard packet modem core: IL2P/AX.25 framing and FEC now; demodulators, KISS TCP and DCD to follow. |
|
|
M0LTE.Il2p
A managed IL2P v0.6 codec for .NET: encodes/decodes AX.25 frames to and from the IL2P wire format (Type 0/1 headers, the packet-synchronous scrambler, Reed-Solomon FEC, block segmentation) including the IL2P+CRC extension, plus a streaming bit-level deframer. Dire-Wolf / NinoTNC interoperable. Extracted from the pdn-soundmodem packet-radio modem. |
|
|
M0LTE.Ardop
A managed, ardopcf-compatible ARDOP 1 virtual TNC for .NET: the 4FSK/4PSK/8PSK/16QAM modulator and demodulator, Reed-Solomon FEC frames, the full ARQ engine (bandwidth negotiation, gearshift) and a byte-compatible TCP host interface, so Winlink hosts (Pat, Winlink Express, ARIM, hamChat) connect unmodified. Drive it from any audio device via the M0LTE.Radio.Audio seam. Extracted from the pdn-soundmodem packet-radio modem; validated bidirectionally against ardopcf. |
|
|
M0LTE.Ofdm
A managed, codec2-compatible FreeDV datac OFDM modem for .NET: the modulator (per-symbol iDFT, cyclic prefix, Hilbert clipper, tx BPF, preamble/postamble, burst assembly), the demodulator with timing/frequency acquisition and streaming + burst sync, LDPC-protected framing and code-shortening for all six datac modes (datac0/1/3/4/13/14), and single-precision complex arithmetic matching the C reference's accumulation order. Ports of codec2 1.2.0 ofdm.c/ofdm_mode.c, validated against codec2-generated vectors and its own CLI. Extracted from the pdn-soundmodem packet-radio modem. |
GitHub repositories
This package is not used by any popular GitHub repositories.