Lines Matching refs:buffer_size
247 static int enlarge_buffer(void **buffer, size_t *buffer_size, size_t *buffer_allocated) { in enlarge_buffer() argument
251 if (*buffer_allocated > *buffer_size) in enlarge_buffer()
254 l = MAX(16*1024U, (*buffer_size * 2)); in enlarge_buffer()
265 …portCompress *c, const void *data, size_t size, void **buffer, size_t *buffer_size, size_t *buffer… in import_compress() argument
270 assert(buffer_size); in import_compress()
281 *buffer_size = 0; in import_compress()
293 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress()
297 c->xz.next_out = (uint8_t*) *buffer + *buffer_size; in import_compress()
298 c->xz.avail_out = *buffer_allocated - *buffer_size; in import_compress()
304 *buffer_size += (*buffer_allocated - *buffer_size) - c->xz.avail_out; in import_compress()
315 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress()
319 c->gzip.next_out = (uint8_t*) *buffer + *buffer_size; in import_compress()
320 c->gzip.avail_out = *buffer_allocated - *buffer_size; in import_compress()
326 *buffer_size += (*buffer_allocated - *buffer_size) - c->gzip.avail_out; in import_compress()
338 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress()
342 c->bzip2.next_out = (void*) ((uint8_t*) *buffer + *buffer_size); in import_compress()
343 c->bzip2.avail_out = *buffer_allocated - *buffer_size; in import_compress()
349 *buffer_size += (*buffer_allocated - *buffer_size) - c->bzip2.avail_out; in import_compress()
369 *buffer_size = size; in import_compress()
379 int import_compress_finish(ImportCompress *c, void **buffer, size_t *buffer_size, size_t *buffer_al… in import_compress_finish() argument
384 assert(buffer_size); in import_compress_finish()
390 *buffer_size = 0; in import_compress_finish()
400 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress_finish()
404 c->xz.next_out = (uint8_t*) *buffer + *buffer_size; in import_compress_finish()
405 c->xz.avail_out = *buffer_allocated - *buffer_size; in import_compress_finish()
411 *buffer_size += (*buffer_allocated - *buffer_size) - c->xz.avail_out; in import_compress_finish()
421 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress_finish()
425 c->gzip.next_out = (uint8_t*) *buffer + *buffer_size; in import_compress_finish()
426 c->gzip.avail_out = *buffer_allocated - *buffer_size; in import_compress_finish()
432 *buffer_size += (*buffer_allocated - *buffer_size) - c->gzip.avail_out; in import_compress_finish()
442 r = enlarge_buffer(buffer, buffer_size, buffer_allocated); in import_compress_finish()
446 c->bzip2.next_out = (void*) ((uint8_t*) *buffer + *buffer_size); in import_compress_finish()
447 c->bzip2.avail_out = *buffer_allocated - *buffer_size; in import_compress_finish()
453 *buffer_size += (*buffer_allocated - *buffer_size) - c->bzip2.avail_out; in import_compress_finish()