Skip to content

rcnbapp/librcnb

Repository files navigation

librcnb: RCNB Encoding/Decoding Routines
======================================

Overview:
--------
librcnb is a library of ANSI C routines for fast encoding/decoding data into
and from a rcnb-encoded format. C++ wrappers are included, as well as the
source code for standalone encoding and decoding executables.

References:
----------
* RCNB.js:
	https://github.com/rcnbapp/RCNB.js
* RCNB.php, another implementation of the rcnb encoding:
	https://github.com/rcnbapp/RCNB.php

Commandline Use:
---------------
There is an executable available, it is simply called rcnb.
It can encode and decode files, as instructed by the user.

To encode a file:
$ ./rcnb -e filea fileb
fileb will now be the rcnb-encoded version of filea.

To decode a file:
$ ./rcnb -d fileb filec
filec will now be identical to filea.

Programming:
-----------
Some C++ wrappers are provided as well, so you don't have to get your hands
dirty. Encoding from standard input to standard output is as simple as

	#include <rcnb/encode.h>
	#include <iostream>
	int main()
	{
		rcnb::encoder E;
		setlocale(LC_ALL, "");
		E.encode(std::cin, std::wcout);
		return 0;
	}

Both standalone executables and a static library is provided in the package,

Example code:
------------
The 'examples' directory contains some simple example code, that demonstrates
how to use the interface of the library.

More information:
------------
Go to https://github.com/rcnbapp/librcnb/wiki to find out more information
about librcnb.