Ejemplo n.º 1
0
void MultiRatePadding::pad(unsigned int rate, MessageQueue& queue) const
{
    queue.appendBit(1);
    queue.appendZeroes(rate - 1 - (queue.lastBlockSize() % rate));
    queue.appendBit(1);
}
Ejemplo n.º 2
0
void PaddingRule::append10star(unsigned int blockSize, MessageQueue& queue) const
{
    queue.appendBit(1);
    if ((queue.lastBlockSize() % blockSize) != 0)
        queue.appendZeroes(blockSize - (queue.lastBlockSize() % blockSize));
}