Skip to content
README 4.97 KiB
Newer Older
Luker's avatar
Luker committed

RaptorQ is a Forward Error Correction algorithm designed to deliver your data
efficiently and without retransmissions for lost packets.

After sending K packets of your data as-is, RaptorQ generates as many repair
symbols as you need. Once the receiver has at least K symbols, be it the source
symbols, repair symbols or any combination of the two, it can reconstruct the
whole input it was meant to receive.

This is called a Fountain code, and RaptorQ is the latest and most efficient
code in this category.


libRaptorQ implements RFC6330, which specifies the RaptorQ algorithm.
NOTE: heavy cluster testing is needed to claim compliance with the
RFC. As we do not have the resources, we do not make such a claim.

libRaptorQ is entirely written in C++11, and uses eigen to handle matrix
manipulation.


Currently it's only been tested under Linux, but should work well under
*BSD and MacOSX, too.

Windows *should* work too, provided you use a complier that understands C++11
(hint: you might have some problems with VisualC++, but that's not a C++
compiler anyway)


Luker's avatar
Luker committed
##############
#
# Developers
#
##############

See the "CONTRIBUTING.md" file.
Luker's avatar
Luker committed

##############
#
# The Source Code
#
##############

Although things seems to work, no stable release has been released yet.

This means you can only check this out with git.

to check out the repository:

$ git clone https://github.com/LucaFulchir/libRaptorQ.git

you can also get it from our main server:

Luker's avatar
Luker committed
$ git clone https://www.fenrirproject.org/Luker/libRaptorQ.git
Luker's avatar
Luker committed


-- GPG source check --
once you have cloned it, it's always a good thing to check the repository gpg
signatures, so you can import my key with:

Luker's avatar
Luker committed
2016 key:
$ gpg --keyserver pgp.mit.edu --recv-key F61F6137
2015 key:
Luker's avatar
Luker committed
$ gpg --keyserver pgp.mit.edu --recv-key D42DDF0A

please check the full fingerprint, it should be like this:

Luker's avatar
Luker committed
$ gpg2 --fingerprint F61F6137
pub   rsa2048/F61F6137 2016-01-11 [expires: 2017-01-25]
      Key fingerprint = 95EB 6FA4 03D7 29A7 13C2  FC9F F85A DA1C F61F 6137
uid         [ultimate] Luca Fulchir (2016 key) <luker@fenrirproject.org>
full 2015 fingerprint:
Key fingerprint = AB35 E45F 5CA5 E35B 8B55  818F 0157 D133 D42D DF0A
Luker's avatar
Luker committed
 

Now you have the source, and the key, it's enough to check the signature of the
last commit:

$ git log -n 1 --show-signature

The important part is that you get something like this:

Luker's avatar
Luker committed
 gpg: Signature made Mon 11 Jan 2016 14:19:21 CET using RSA key ID F61F6137
 gpg: Good signature from "Luca Fulchir (2016 key) <luker@fenrirproject.org>"
Luker's avatar
Luker committed
 [unknown]
 gpg: WARNING: This key is not certified with a trusted signature!
 gpg:          There is no indication that the signature belongs to the owner.
Luker's avatar
Luker committed
 Primary key fingerprint: 95EB 6FA4 03D7 29A7 13C2  FC9F F85A DA1C F61F 6137
Luker's avatar
Luker committed
 Author: Luca Fulchir <luker@fenrirproject.org>

And as long as you got the right key, and you find the "gpg: Goog signature",
you can be sure you have the right code.

Luker's avatar
Luker committed
TDB: The repository is using the maintainer private key for now,
it will start using a dedicated key in the (near) future.
Luker's avatar
Luker committed


##############
#
# Install
#
##############

Before building libRaptorQ, make sure your system has the eigen3 library
headers, or it won't compile.

Eigen3 is the only dependency of libRaptorQ


The build system uses CMake. So enter the source directory and we'll create a
directory and build everything there:

$ mkdir build
$ cd build

$ cmake -DCMAKE_BUILD_TYPE=Release ../

$ make -j 4

Luker's avatar
Luker committed
Optional targets are available:
$ make tests examples docs
where:
	tests: benchmarks, rfc tests.
	examples: C/C++ examples
	docs: LATEX documentation.
Luker's avatar
Luker committed

Luker's avatar
Luker committed
or simply:
Luker's avatar
Luker committed
$ make -j 4 everything
Luker's avatar
Luker committed

finally, install everything
Luker's avatar
Luker committed
$ make install

Luker's avatar
Luker committed
libRaptorQ uses deterministic (reproducible) builds,
so if you compile it twice, or on two different computers
(but with the same compiler), the hash of the resulting
libraries will be the same.

The only configuration that breaks deterministic builds
currently is the clang + profiling one. It probably can not
be fixed.

You can customize the CMake build with tthe following variables:
Luker's avatar
Luker committed
PROFILING	ON/OFF: Default:ON. Activate or deactivate profiling.
Luker's avatar
Luker committed
				Profiling compiles everything, then runs a test to see
				which code paths are more used. Then it recompiles everything
				but optimizing for for those code paths.
				Only for gcc/clang.
Luker's avatar
Luker committed
LTO			ON/OFF: Default:ON. Activate or deactivate Link time Optimization
Luker's avatar
Luker committed
				Makes the library smaller and better optimized.
				Only for gcc/clang.
Luker's avatar
Luker committed
CLANG_STDLIB ON/OFF: Default:OFF. use clang's libc++
				Note: only clang can use its standard library
Luker's avatar
Luker committed
CMAKE_C_COMPILER	gcc, clang...
Luker's avatar
Luker committed
CMAKE_CXX_COMPILER	choose between g++ or clang++.
CMAKE_BUILD_TYPE	Debug,MinSizeRel,Release,RelWithDebInfo
CMAKE_INSTALL_PREFIX Default: /usr/local
Luker's avatar
Luker committed
##############
#
# Using libRaptorQ
#
##############
Luker's avatar
Luker committed
Compile the documentation:
$ make docs
Luker's avatar
Luker committed

Luker's avatar
Luker committed
or simply visit:
Luker's avatar
Luker committed
https://www.fenrirproject.org/Luker/libRaptorQ/wikis/libRaptorQ.pdf
Luker's avatar
Luker committed
for the full up-to-date documentation.
Luker's avatar
Luker committed
includes the information in this readme, plus a quick description
of the RaptorQ algorithm, and the C and C++ interfaces.