Lines Matching refs:size

74 InputStreamBuffer::InputStreamBuffer(const void* data, size_t size)  in InputStreamBuffer()  argument
75 : InputStreamBuffer(data, static_cast<const uint8_t*>(data) + size) {} in InputStreamBuffer()
87 bool InputStreamBuffer::Read(void* data, size_t size) { in Read() argument
90 while (size > static_cast<size_t>(end_ - pos_)) { in Read()
93 size -= end_ - pos_; in Read()
100 memcpy(buffer, pos_, size); in Read()
101 pos_ += size; in Read()
117 bool InputStreamBuffer::Skip(size_t size) { in Skip() argument
119 while (size > static_cast<size_t>(end_ - pos_)) { in Skip()
120 size -= end_ - pos_; in Skip()
127 pos_ += size; in Skip()
136 size_t size) in NestedInputStreamBuffer() argument
137 : InputStreamBuffer(delegate->pos_, ClampEnd(delegate, size)), in NestedInputStreamBuffer()
139 remaining_(size) {} in NestedInputStreamBuffer()
155 size_t size) { in ClampEnd() argument
157 return size < static_cast<size_t>(delegate->end_ - delegate->pos_) in ClampEnd()
158 ? delegate->pos_ + size in ClampEnd()
162 OutputStreamBuffer::OutputStreamBuffer(void* data, size_t size) in OutputStreamBuffer() argument
163 : OutputStreamBuffer(data, static_cast<uint8_t*>(data) + size) {} in OutputStreamBuffer()
174 bool OutputStreamBuffer::Write(const void* data, size_t size) { in Write() argument
177 while (size > static_cast<size_t>(end_ - pos_)) { in Write()
180 size -= end_ - pos_; in Write()
187 memcpy(pos_, buffer, size); in Write()
188 pos_ += size; in Write()
221 : OutputStreamBuffer(blob->data(), blob->size()), blob_(blob) {} in BlobOutputStreamBuffer()
225 if (!blob_->Resize(max<size_t>(blob_->size() * 2, 32))) { in Advance()
229 end_ = blob_->data() + blob_->size(); in Advance()
237 end_ = blob_->data() + blob_->size(); in Truncate()
255 uint64_t size; in ReadWireTag() local
256 if (!DecodeVarint(stream_buffer_, &size)) { in ReadWireTag()
259 field_size_ = static_cast<size_t>(size); in ReadWireTag()
260 if (static_cast<uint64_t>(field_size_) != size) { in ReadWireTag()
286 bool ProtoReader::ReadLengthDelimited(void* data, size_t size) { in ReadLengthDelimited() argument
288 return stream_buffer_->Read(data, size); in ReadLengthDelimited()
310 bool ProtoWriter::WriteLengthDelimited(const void* data, size_t size) { in WriteLengthDelimited() argument
312 EncodeVarint(stream_buffer_, size) && in WriteLengthDelimited()
313 stream_buffer_->Write(data, size); in WriteLengthDelimited()
316 bool ProtoWriter::WriteLengthHeader(size_t size) { in WriteLengthHeader() argument
318 EncodeVarint(stream_buffer_, size); in WriteLengthHeader()