Lines Matching refs:size

231         int r, size; /* LZ4 uses int for size */  in decompress_blob_lz4()  local
241 size = unaligned_read_le64(src); in decompress_blob_lz4()
242 if (size < 0 || (unsigned) size != unaligned_read_le64(src)) in decompress_blob_lz4()
244 out = greedy_realloc(dst, size, 1); in decompress_blob_lz4()
248 r = LZ4_decompress_safe((char*)src + 8, out, src_size - 8, size); in decompress_blob_lz4()
249 if (r < 0 || r != size) in decompress_blob_lz4()
252 *dst_size = size; in decompress_blob_lz4()
267 uint64_t size; in decompress_blob_zstd() local
274 size = ZSTD_getFrameContentSize(src, src_size); in decompress_blob_zstd()
275 if (IN_SET(size, ZSTD_CONTENTSIZE_ERROR, ZSTD_CONTENTSIZE_UNKNOWN)) in decompress_blob_zstd()
278 if (dst_max > 0 && size > dst_max) in decompress_blob_zstd()
279 size = dst_max; in decompress_blob_zstd()
280 if (size > SIZE_MAX) in decompress_blob_zstd()
283 if (!(greedy_realloc(dst, MAX(ZSTD_DStreamOutSize(), size), 1))) in decompress_blob_zstd()
292 .size = src_size, in decompress_blob_zstd()
296 .size = MALLOC_SIZEOF_SAFE(*dst), in decompress_blob_zstd()
304 assert(output.pos >= size); in decompress_blob_zstd()
306 *dst_size = size; in decompress_blob_zstd()
439 size_t size; in decompress_startswith_lz4() local
454 r = decompress_blob_lz4(src, src_size, buffer, &size, 0); in decompress_startswith_lz4()
458 if (size < prefix_len + 1) in decompress_startswith_lz4()
482 uint64_t size = ZSTD_getFrameContentSize(src, src_size); in decompress_startswith_zstd() local
483 if (IN_SET(size, ZSTD_CONTENTSIZE_ERROR, ZSTD_CONTENTSIZE_UNKNOWN)) in decompress_startswith_zstd()
486 if (size < prefix_len + 1) in decompress_startswith_zstd()
498 .size = src_size, in decompress_startswith_zstd()
502 .size = MALLOC_SIZEOF_SAFE(*buffer), in decompress_startswith_zstd()
887 .size = 0, in compress_stream_zstd()
898 input.size = (size_t) red; in compress_stream_zstd()
903 .size = out_allocsize, in compress_stream_zstd()
936 finished = is_last_chunk ? (remaining == 0) : (input.pos == input.size); in compress_stream_zstd()
940 assert(input.pos == input.size); in compress_stream_zstd()
991 .size = 0, in decompress_stream_zstd()
1003 input.size = (size_t) red; in decompress_stream_zstd()
1011 while (input.pos < input.size) { in decompress_stream_zstd()
1014 .size = out_allocsize, in decompress_stream_zstd()