2 * Copyright (c) Meta Platforms, Inc. and affiliates.
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.
11 #ifndef FILEIO_TYPES_HEADER
12 #define FILEIO_TYPES_HEADER
14 #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_compressionParameters */
15 #include "../lib/zstd.h" /* ZSTD_* */
17 /*-*************************************
18 * Parameters: FIO_prefs_t
19 ***************************************/
21 typedef struct FIO_display_prefs_s FIO_display_prefs_t;
23 typedef enum { FIO_ps_auto, FIO_ps_never, FIO_ps_always } FIO_progressSetting_e;
25 struct FIO_display_prefs_s {
26 int displayLevel; /* 0 : no display; 1: errors; 2: + result + interaction + warnings; 3: + progression; 4: + information */
27 FIO_progressSetting_e progressSetting;
31 typedef enum { FIO_zstdCompression, FIO_gzipCompression, FIO_xzCompression, FIO_lzmaCompression, FIO_lz4Compression } FIO_compressionType_t;
33 typedef struct FIO_prefs_s {
35 /* Algorithm preferences */
36 FIO_compressionType_t compressionType;
37 int sparseFileSupport; /* 0: no sparse allowed; 1: auto (file yes, stdout no); 2: force sparse */
43 int useRowMatchFinder;
53 size_t targetCBlockSize;
56 ZSTD_paramSwitch_e literalCompressionMode;
63 /* Computation resources preferences */
67 int excludeCompressedFiles;
70 int allowBlockDevices;
72 ZSTD_paramSwitch_e mmapDict;
75 typedef enum {FIO_mallocDict, FIO_mmapDict} FIO_dictBufferType_t;
79 size_t dictBufferSize;
80 FIO_dictBufferType_t dictBufferType;
81 #if defined(_MSC_VER) || defined(_WIN32)
86 #endif /* FILEIO_TYPES_HEADER */