Add simple C/C++ cli tool maybe?
Hi, me again.
Recently (when looking into https://github.com/mk-fg/python-libraptorq/issues/1 ) stumbled upon the problem that python wrapper around libRaptorQ (0.1.6 and 0.1.7) seem to:
- Flat-out fail at encoding some data - calling RaptorQ_Enc() returns context with 0 blocks some non-empty files (see below).
- For anything larger than ~100K, decoding produces different data from what was encoded, which is really bad.
Looking through what I might be doing wrong in the wrapper, haven't found any obvious issues there, so have no clue if it's a wrapper or lib itself causing it.
I think best test for that might be canonical "test.c" or "test.cpp" that'd be able to encode/decode some real-world data, but looking at somewhat arcane test_c and test_cpp, I think it'd take me a while to figure out how to do it properly in these langs, so wonder if maybe you have some code that does that around already, maybe can simply commit it into repo? That'd allow me to easily check what wrapper produces against "reference" encoder, see if it matches and figure out if it's wrapper or the lib itself that way.
I know it's not really an issue, more of a request, and if it's not completely trivial task for you either, or not really a good idea, feel free to just close this thing, no big deal.
Attached sample file ~80K I've got from /dev/urandom that encodes to nothing for me here on amd64 machine with ENC_32 subsymbol=8 symbol_size=16 max_mem=200. RaptorQ_precompute returns immediately for it, and RaptorQ_blocks returns 0.
Also, as mentioned, anything that e.g. dd if=/dev/urandom of=testfile bs=100K count=1
can produce decodes to corrupted data, for bs=100K and up, while mostly working for anything smaller than that (except e.g. cases like one above).