Lines Matching refs:residual
6946 ** in the "residual" buffer.
7035 * to our "decode" callback or some residual bytes from the previous buffer. */
7070 return in_buf(p, d->residual, d->residual_end);
7129 d->residual_end = d->residual;
7130 switchtobuf(d, d->residual, d->residual_end);
7143 UPB_ASSERT(!(d->skip && d->residual_end > d->residual));
7174 if (d->residual_end > d->residual) {
7175 /* We have residual bytes from the last buffer. */
7176 UPB_ASSERT(d->ptr == d->residual);
7200 /* Suspends the decoder at the last checkpoint, without saving any residual
7204 if (d->checkpoint == d->residual) {
7205 /* Checkpoint was in residual buf; no user bytes were consumed. */
7206 d->ptr = d->residual;
7214 d->residual_end = d->residual;
7215 switchtobuf(d, d->residual, d->residual_end);
7221 * bytes in our residual buffer. This is necessary if we need more user
7226 * Save any unconsumed bytes (if any) to the residual buffer. */
7229 if (d->checkpoint == d->residual) {
7230 /* Checkpoint was in residual buf; append user byte(s) to residual buf. */
7231 UPB_ASSERT((d->residual_end - d->residual) + d->size_param <=
7232 sizeof(d->residual));
7234 d->bufstart_ofs -= (d->residual_end - d->residual);
7239 /* Checkpoint was in user buf; old residual bytes not needed. */
7245 UPB_ASSERT(save <= sizeof(d->residual));
7246 memcpy(d->residual, d->ptr, save);
7247 d->residual_end = d->residual + save;
7251 switchtobuf(d, d->residual, d->residual_end);
7834 if (d->residual_end > d->residual) {
7893 d->ptr = d->residual;
7894 d->buf = d->residual;
7895 d->end = d->residual;
7896 d->residual_end = d->residual;