Lines Matching refs:fragment_size
44 zip_uint64_t fragment_size; /* size of each fragment */ member
64 static buffer_t *buffer_new(zip_uint64_t fragment_size);
66 static buffer_t *buffer_new_write(zip_uint64_t fragment_size);
260 buffer_new(zip_uint64_t fragment_size) in buffer_new() argument
268 buffer->fragment_size = fragment_size; in buffer_new()
308 buffer_new_write(zip_uint64_t fragment_size) in buffer_new_write() argument
312 if ((buffer = buffer_new(fragment_size)) == NULL) { in buffer_new_write()
342 i = buffer->offset / buffer->fragment_size; in buffer_read()
343 fragment_offset = buffer->offset % buffer->fragment_size; in buffer_read()
346 zip_uint64_t left = ZIP_MIN(length - n, buffer->fragment_size - fragment_offset); in buffer_read()
380 if (buffer->offset + length + buffer->fragment_size - 1 < length) { in buffer_write()
386 if (buffer->offset + length > buffer->nfragments * buffer->fragment_size) { in buffer_write()
387 …t needed_fragments = (buffer->offset + length + buffer->fragment_size - 1) / buffer->fragment_size; in buffer_write()
408 if ((buffer->fragments[buffer->nfragments] = malloc(buffer->fragment_size)) == NULL) { in buffer_write()
416 i = buffer->offset / buffer->fragment_size; in buffer_write()
417 fragment_offset = buffer->offset % buffer->fragment_size; in buffer_write()
420 zip_uint64_t left = ZIP_MIN(length - n, buffer->fragment_size - fragment_offset); in buffer_write()