Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
zstd_helpers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
8 * You may select, at your option, one of the above-listed licenses.
9 */
14#ifndef ZSTD_HELPERS_H
15#define ZSTD_HELPERS_H
16
17#define ZSTD_STATIC_LINKING_ONLY
18
19#include "zstd.h"
20#include "zstd_errors.h"
21#include "fuzz_data_producer.h"
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28extern const int kMinClevel;
29extern const int kMaxClevel;
30
32
33ZSTD_compressionParameters FUZZ_randomCParams(size_t srcSize, FUZZ_dataProducer_t *producer);
34ZSTD_frameParameters FUZZ_randomFParams(FUZZ_dataProducer_t *producer);
36
37typedef struct {
38 void* buff;
39 size_t size;
41
42/* Quickly train a dictionary from a source for fuzzing.
43 * NOTE: Don't use this to train production dictionaries, it is only optimized
44 * for speed, and doesn't care about dictionary quality.
45 */
46FUZZ_dict_t FUZZ_train(void const* src, size_t srcSize, FUZZ_dataProducer_t *producer);
47
48#ifdef FUZZ_THIRD_PARTY_SEQ_PROD
49extern void* FUZZ_seqProdState;
50#endif
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* ZSTD_HELPERS_H */
char int srcSize
Definition lz4.h:806
const char * src
Definition lz4.h:866
Definition fuzz_data_producer.c:3
Definition zstd_helpers.h:36
Definition zstd_compress_internal.h:358
Definition zstd_v04.c:255
size_t size
Definition platform.h:559
ZSTD_CCtx * cctx
Definition dictionary_stream_round_trip.c:26
FUZZ_dict_t FUZZ_train(void const *src, size_t srcSize, FUZZ_dataProducer_t *producer)
Definition zstd_helpers.c:109
const int kMinClevel
Definition zstd_helpers.c:21
ZSTD_compressionParameters FUZZ_randomCParams(size_t srcSize, FUZZ_dataProducer_t *producer)
Definition zstd_helpers.c:35
void FUZZ_setRandomParameters(ZSTD_CCtx *cctx, size_t srcSize, FUZZ_dataProducer_t *producer)
Definition zstd_helpers.c:68
ZSTD_parameters FUZZ_randomParams(size_t srcSize, FUZZ_dataProducer_t *producer)
Definition zstd_helpers.c:60
const int kMaxClevel
Definition zstd_helpers.c:22
ZSTD_frameParameters FUZZ_randomFParams(FUZZ_dataProducer_t *producer)
Definition zstd_helpers.c:50
void * FUZZ_seqProdState
Definition zstd_helpers.c:26