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) Facebook, Inc.
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 "fuzz_data_producer.h"
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27extern const int kMinClevel;
28extern const int kMaxClevel;
29
31
32ZSTD_compressionParameters FUZZ_randomCParams(size_t srcSize, FUZZ_dataProducer_t *producer);
33ZSTD_frameParameters FUZZ_randomFParams(FUZZ_dataProducer_t *producer);
35
36typedef struct {
37 void* buff;
38 size_t size;
40
41/* Quickly train a dictionary from a source for fuzzing.
42 * NOTE: Don't use this to train production dictionaries, it is only optimized
43 * for speed, and doesn't care about dictionary quality.
44 */
45FUZZ_dict_t FUZZ_train(void const* src, size_t srcSize, FUZZ_dataProducer_t *producer);
46
47#ifdef __cplusplus
48}
49#endif
50
51#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
size_t size
Definition zstd_helpers.h:38
void * buff
Definition zstd_helpers.h:37
Definition zstd_compress_internal.h:358
Definition zstd_v04.c:255
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