A fast, portable C library implementing O(N) fountain codes for error correction of large data.
Wirehair is a C library that implements a fountain code for error correction, enabling data recovery from a subset of transmitted blocks. It solves the problem of reliable data transmission over lossy networks or storage by generating redundant symbols with O(N) time complexity, making it efficient for large datasets. Unlike many codes, it supports unlimited error correction blocks and high packet counts.
Developers and engineers building systems for data transmission, storage, or streaming that require robust error correction, such as file servers, peer-to-peer networks, or distributed storage solutions.
Developers choose Wirehair for its linear time complexity with large data, low overhead, and unlimited block generation, offering better scalability than alternatives like Leopard or Fecal. Its portable, dependency-free C API makes it easy to integrate into performance-critical applications.
Wirehair : O(N) Fountain Code for Large Data
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Encoding and decoding scale linearly with data size (O(N)), making it highly efficient for large datasets, as benchmarks show support for up to 32,768 packets with consistent performance.
Can generate an endless stream of redundant blocks, providing flexibility in lossy environments without predefined limits, unlike many fountain codes.
On average, only about N + 0.02 packets are needed to recover data, minimizing redundancy and making it competitive with other codes like LDPC.
Offers a simple, dependency-free C interface that is easy to integrate into existing C/C++ projects, as demonstrated by the example usage code.
Sometimes fails to recover data with exactly N packets, requiring N+1 or N+2, which can be a drawback in scenarios where perfect MDS efficiency is critical.
For packet counts below 128, it is less efficient than alternatives like Fecal, as admitted in the benchmarks section, making it suboptimal for small-scale applications.
Requires CMake and specific build steps (e.g., Visual Studio on Windows), which might be cumbersome for developers seeking quick integration or unfamiliar with these tools.