52 buffer.Reserve(context->getRemainingCharacters() + 1);
59 CBC_HighLevelEncoder::LookAheadTest(context->m_msg, context->m_pos,
66 size_t dataCount = buffer.GetLength() - 1;
68 FXSYS_itoa(dataCount, buf, 10);
69 buffer.SetAt(0,
static_cast<
wchar_t>(*buf) -
'0');
70 int32_t lengthFieldSize = 1;
72 context->getCodewordCount() + dataCount + lengthFieldSize;
76 bool mustPad = (context->m_symbolInfo->data_capacity() - currentSize) > 0;
78 if (dataCount <= 249) {
79 buffer.SetAt(0,
static_cast<
wchar_t>(dataCount));
80 }
else if (dataCount > 249 && dataCount <= 1555) {
81 buffer.SetAt(0,
static_cast<
wchar_t>((dataCount / 250) + 249));
82 buffer.Insert(1,
static_cast<
wchar_t>(dataCount % 250));
87 for (
const auto& c : buffer) {
89 Randomize255State(c, context->getCodewordCount() + 1)
);
void writeCodeword(wchar_t codeword)
void SignalEncoderChange(CBC_HighLevelEncoder::Encoding encoding)