资源简介
实现了高通的RaptorQ喷泉码(RFC6330),实际可用的代码
代码片段和文件信息
#pragma once
#include “Helper.h“
#include “Symbol.h“
Decoder::Decoder() {
}
Decoder::~Decoder() {
delete gen;
}
/* initialize general parameters as much as possible
this is meant to be called only once.
By default N is set to K. It will be fixup in prepare()
*/
bool Decoder::init(int K int T) {
gen = new Generators();
return gen->gen(K K T);
}
Symbol** Decoder::decode(char **source int _N int *esi)
{
Symbol **s;
gen->prepare(source_Nesi);
s = gen->generate_intermediates();
if (!s) return NULL;
return s;
}
Symbol* Decoder::recover(int x)
{
return gen->recover_symbol(x);
}
评论
共有 条评论