Commit d94aa66b authored by Maxim Onciul's avatar Maxim Onciul
Browse files

debug foldToBytes

parent 7d8c9387
......@@ -359,6 +359,10 @@ Coding::foldToBytes(vector<uint8_t>* input, unsigned int output_length)
gf* output = (gf*) malloc(output_length * sizeof(gf));
if(!output) throw new bad_alloc();
#ifdef TEST
cout << "fold to bytes, Output:" << endl;
#endif // TEST
for(unsigned int i = 0; i < output_length; i++)
{
uint8_t intermediate = 0;
......@@ -368,7 +372,13 @@ Coding::foldToBytes(vector<uint8_t>* input, unsigned int output_length)
intermediate |= (input->at(i*8 + j));
}
output[i] = intermediate;
#ifdef TEST
cout << output[i] << " ";
#endif // TEST
}
#ifdef TEST
cout << endl;
#endif // TEST
return output;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment