Lines Matching +full:no +full:- +full:big +full:- +full:frame +full:- +full:no
1 // SPDX-License-Identifier: GPL-2.0
4 * Important notes about in-place decompression
14 * The worst case for in-place decompression is that the beginning of
16 * uncompressible. Thus, we must look for worst-case expansion when the
22 * Frame Header: (18)
26 * The frame header and checksum overhead is at most 22 bytes.
43 * - 22 bytes for the .zst file format headers;
44 * - 3 bytes per every 128 KiB of uncompressed size (one block header per
46 * - 128 KiB (biggest possible zstd block size) to make sure that the
59 * zstd's only source dependency is xxhash, which has no source
83 * Size of the input and output buffers in multi-call mode.
111 error("ZSTD-compressed data is corrupt"); in handle_zstd_error()
114 error("ZSTD-compressed data is probably corrupt"); in handle_zstd_error()
117 return -1; in handle_zstd_error()
122 * We can allocate less memory (no circular buffer for the sliding window),
137 err = -1; in decompress_single()
141 * Find out how large the frame actually is, there may be junk at in decompress_single()
142 * the end of the frame that zstd_decompress_dctx() can't handle. in decompress_single()
184 * ZSTD decompression code won't be happy if the buffer size is so big in __unzstd()
186 * it as big as possible without having the end address overflow. in __unzstd()
189 out_len = UINTPTR_MAX - (uintptr_t)out_buf; in __unzstd()
208 err = -1; in __unzstd()
214 /* Read the first chunk, since we need to decode the frame header. */ in __unzstd()
218 error("ZSTD-compressed data is truncated"); in __unzstd()
219 err = -1; in __unzstd()
222 /* Set the first non-empty input buffer. */ in __unzstd()
231 err = -1; in __unzstd()
254 error("ZSTD-compressed data has an incomplete frame header"); in __unzstd()
255 err = -1; in __unzstd()
259 error("ZSTD-compressed data has too large a window size"); in __unzstd()
260 err = -1; in __unzstd()
273 err = -1; in __unzstd()
279 * Read more data if necessary (error if no more data can be read). in __unzstd()
293 in_len = fill ? fill(in_buf, ZSTD_IOBUF_SIZE) : -1; in __unzstd()
295 error("ZSTD-compressed data is truncated"); in __unzstd()
296 err = -1; in __unzstd()
302 /* Returns zero when the frame is complete. */ in __unzstd()
311 err = -1; in __unzstd()