Lines Matching refs:pos_
78 : pos_(static_cast<const uint8_t*>(start)), in InputStreamBuffer()
80 NVRAM_CHECK(pos_ <= end_); in InputStreamBuffer()
84 return pos_ >= end_ && !Advance(); in Done()
89 NVRAM_CHECK(pos_ <= end_); in Read()
90 while (size > static_cast<size_t>(end_ - pos_)) { in Read()
91 memcpy(buffer, pos_, end_ - pos_); in Read()
92 buffer += end_ - pos_; in Read()
93 size -= end_ - pos_; in Read()
94 pos_ = end_; in Read()
98 NVRAM_CHECK(pos_ < end_); in Read()
100 memcpy(buffer, pos_, size); in Read()
101 pos_ += size; in Read()
106 if (pos_ >= end_) { in ReadByte()
110 NVRAM_CHECK(pos_ < end_); in ReadByte()
112 *byte = *pos_; in ReadByte()
113 ++pos_; in ReadByte()
118 NVRAM_CHECK(pos_ <= end_); in Skip()
119 while (size > static_cast<size_t>(end_ - pos_)) { in Skip()
120 size -= end_ - pos_; in Skip()
121 pos_ = end_; in Skip()
125 NVRAM_CHECK(pos_ < end_); in Skip()
127 pos_ += size; in Skip()
137 : InputStreamBuffer(delegate->pos_, ClampEnd(delegate, size)), in NestedInputStreamBuffer()
142 remaining_ -= end_ - delegate_->pos_; in Advance()
144 delegate_->pos_ = end_; in Advance()
148 pos_ = delegate_->pos_; in Advance()
156 NVRAM_CHECK(delegate->pos_ <= delegate->end_); in ClampEnd()
157 return size < static_cast<size_t>(delegate->end_ - delegate->pos_) in ClampEnd()
158 ? delegate->pos_ + size in ClampEnd()
166 : pos_(static_cast<uint8_t*>(start)), end_(static_cast<uint8_t*>(end)) { in OutputStreamBuffer()
167 NVRAM_CHECK(pos_ <= end_); in OutputStreamBuffer()
171 return pos_ >= end_ && !Advance(); in Done()
176 NVRAM_CHECK(pos_ <= end_); in Write()
177 while (size > static_cast<size_t>(end_ - pos_)) { in Write()
178 memcpy(pos_, buffer, end_ - pos_); in Write()
179 buffer += end_ - pos_; in Write()
180 size -= end_ - pos_; in Write()
181 pos_ = end_; in Write()
185 NVRAM_CHECK(pos_ < end_); in Write()
187 memcpy(pos_, buffer, size); in Write()
188 pos_ += size; in Write()
193 if (pos_ >= end_) { in WriteByte()
197 NVRAM_CHECK(pos_ < end_); in WriteByte()
199 *pos_ = byte; in WriteByte()
200 ++pos_; in WriteByte()
212 bytes_written_ += pos_ - scratch_space_; in Advance()
213 pos_ = scratch_space_; in Advance()
224 ptrdiff_t offset = pos_ - blob_->data(); in Advance()
228 pos_ = blob_->data() + offset; in Advance()
234 if (!blob_->Resize(pos_ - blob_->data())) { in Truncate()
238 pos_ = end_; in Truncate()