Lines Matching refs:size
115 zx_status_t SparseReader::InitializeBuffer(size_t size, buffer_t* out_buf) {
116 if (size < LZ4_MAX_BLOCK_SIZE) {
117 fprintf(stderr, "Buffer size must be >= %d\n", LZ4_MAX_BLOCK_SIZE);
121 out_buf->max_size = size;
122 out_buf->size = 0;
125 out_buf->data.reset(new (&ac) uint8_t[size]);
175 if ((status = ReadRaw(in_buf_.data.get(), to_read_, &in_buf_.size)) != ZX_OK) {
179 size_t src_sz = in_buf_.size;
184 size_t dst_sz = out_buf_.max_size - out_buf_.size;
185 next = LZ4F_decompress(dctx_, out_buf_.data.get() + out_buf_.size, &dst_sz,
192 out_buf_.size += dst_sz;
194 in_buf_.size -= src_sz;
199 ZX_ASSERT(in_buf_.size == 0);
203 size_t cp = fbl::min(length - total_size, static_cast<size_t>(out_buf_.size));
292 printf("Remaining bytes read into compression buffer: %lu\n", in_buf_.size);
293 printf("Remaining bytes written to decompression buffer: %lu\n", out_buf_.size);