animetosho / rapidyenc

SIMD accelerated yEnc en/decode C library
5 stars 0 forks source link
crc32 usenet yenc yencode

This C compatible library provides functions for implementing yEnc where speed is important.

Note that it only handles the underlying encoding/decoding routines - yEnc headers aren’t handled.

Features

Building

A build file/project can be created using CMake.

mkdir build
cd build
cmake ..
cmake --build . --config Release

After compilation, a shared and static library should be generated, as well as a benchmark and sample CLI application.

Build Options

The following options can be passed into CMake:

API

Before any encoding/decoding/CRC functions can be used, the respective _init function must be called. These functions set up the necessary state for computation. Note that _init functions aren’t thread-safe, but all others are.

Functions documented in the header file.

cli.c is a simple command-line application which encodes/decodes stdin to stdout. It demonstrates how to do incremental encoding/decoding/CRC32 using this library.

Other Language Bindings

Algorithm

A brief description of how the SIMD yEnc encoding algorithm works can be found here. I may eventually write up something more detailed, regarding optimizations and such used.

License

This module is Public Domain or CC0 (or equivalent) if PD isn’t recognised.

crcutil, used for CRC32 calculation, is licensed under the Apache License 2.0

zlib-ng, from where the CRC32 calculation using folding approach was stolen, is under a zlib license