• Home
  • Raw
  • Download

Lines Matching +full:zstd +full:- +full:src

1 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
6 * This source code is licensed under both the BSD-style license (found in the
7 * LICENSE file in the root directory of https://github.com/facebook/zstd) and
9 * https://github.com/facebook/zstd). You may select, at your option, one of the
10 * above-listed licenses.
17 * This is a kernel-style API that wraps the upstream zstd API, which cannot be
19 * functionality which is currently required by users of zstd in the kernel.
20 * Expose extra functions from lib/zstd/zstd.h as needed.
30 * zstd_compress_bound() - maximum compressed size in worst case scenario
38 * zstd_is_error() - tells if a size_t function result is an error code
41 * Return: Non-zero iff the code is an error.
46 * enum zstd_error_code - zstd error codes
51 * zstd_get_error_code() - translates an error function result to an error code
59 * zstd_get_error_name() - translates an error function result to a string
67 * zstd_min_clevel() - minimum allowed compression level
74 * zstd_max_clevel() - maximum allowed compression level
83 * enum zstd_strategy - zstd compression search strategy
90 * struct zstd_compression_parameters - zstd compression parameters
102 * @strategy: The zstd compression strategy.
109 * struct zstd_frame_parameters - zstd frame parameters
112 * @checksumFlag: Controls whether a 32-bit checksum is generated at the
122 * struct zstd_parameters - zstd parameters
129 * zstd_get_params() - returns zstd_parameters for selected level
139 /* ====== Single-pass Compression ====== */
144 * zstd_cctx_workspace_bound() - max memory needed to initialize a zstd_cctx
157 * zstd_init_cctx() - initialize a zstd compression context
163 * Return: A zstd compression context or NULL on error.
168 * zstd_compress_cctx() - compress src into dst with the initialized parameters
170 * @dst: The buffer to compress src into.
173 * @src: The data to compress.
181 const void *src, size_t src_size, const zstd_parameters *parameters);
183 /* ====== Single-pass Decompression ====== */
188 * zstd_dctx_workspace_bound() - max memory needed to initialize a zstd_dctx
196 * zstd_init_dctx() - initialize a zstd decompression context
202 * Return: A zstd decompression context or NULL on error.
207 * zstd_decompress_dctx() - decompress zstd compressed src into dst
209 * @dst: The buffer to decompress src into.
213 * @src: The zstd compressed data to decompress. Multiple concatenated
221 const void *src, size_t src_size);
226 * struct zstd_in_buffer - input buffer for streaming
227 * @src: Start of the input buffer.
237 * struct zstd_out_buffer - output buffer for streaming
252 * zstd_cstream_workspace_bound() - memory needed to initialize a zstd_cstream
261 * zstd_init_cstream() - initialize a zstd streaming compression context
262 * @parameters The zstd parameters to use for compression.
270 * Use zstd_cstream_workspace_bound(params->cparams) to
273 * Return: The zstd streaming compression context or NULL on error.
279 * zstd_reset_cstream() - reset the context using parameters from creation
280 * @cstream: The zstd streaming compression context to reset.
284 * loading, since it can be reused. If `pledged_src_size` is non-zero the frame
294 * zstd_compress_stream() - streaming compress some of input into output
295 * @cstream: The zstd streaming compression context.
296 * @output: Destination buffer. `output->pos` is updated to indicate how much
298 * @input: Source buffer. `input->pos` is updated to indicate how much data
300 * case `input->pos < input->size`, and it's up to the caller to
314 * zstd_flush_stream() - flush internal buffers into output
315 * @cstream: The zstd streaming compression context.
316 * @output: Destination buffer. `output->pos` is updated to indicate how much
329 * zstd_end_stream() - flush internal buffers into output and end the frame
330 * @cstream: The zstd streaming compression context.
331 * @output: Destination buffer. `output->pos` is updated to indicate how much
347 * zstd_dstream_workspace_bound() - memory needed to initialize a zstd_dstream
356 * zstd_init_dstream() - initialize a zstd streaming decompression context
364 * Return: The zstd streaming decompression context.
370 * zstd_reset_dstream() - reset the context using parameters from creation
371 * @dstream: The zstd streaming decompression context to reset.
381 * zstd_decompress_stream() - streaming decompress some of input into output
382 * @dstream: The zstd streaming decompression context.
407 * zstd_find_frame_compressed_size() - returns the size of a compressed frame
408 * @src: Source buffer. It should point to the start of a zstd encoded
413 * Return: The compressed size of the frame pointed to by `src` or an error,
417 size_t zstd_find_frame_compressed_size(const void *src, size_t src_size);
420 * struct zstd_frame_params - zstd frame parameters stored in the frame header
425 * @frameType: The frame type (zstd or skippable)
435 * zstd_get_frame_header() - extracts parameters from a zstd or skippable frame
437 * @src: The source buffer. It must point to a zstd or skippable frame.
444 size_t zstd_get_frame_header(zstd_frame_header *params, const void *src,