PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: zdict.h Size: 25.81 KB
/proc/thread-self/root/usr/include/zdict.h

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under both the BSD-style license (found in the
 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
 * in the COPYING file in the root directory of this source tree).
 * You may select, at your option, one of the above-listed licenses.
 */

#if defined (__cplusplus)
extern "C" {
#endif

#ifndef ZSTD_ZDICT_H
#define ZSTD_ZDICT_H

/*======  Dependencies  ======*/
#include <stddef.h>  /* size_t */


/* =====   ZDICTLIB_API : control library symbols visibility   ===== */
#ifndef ZDICTLIB_VISIBLE
   /* Backwards compatibility with old macro name */
#  ifdef ZDICTLIB_VISIBILITY
#    define ZDICTLIB_VISIBLE ZDICTLIB_VISIBILITY
#  elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
#    define ZDICTLIB_VISIBLE __attribute__ ((visibility ("default")))
#  else
#    define ZDICTLIB_VISIBLE
#  endif
#endif

#ifndef ZDICTLIB_HIDDEN
#  if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
#    define ZDICTLIB_HIDDEN __attribute__ ((visibility ("hidden")))
#  else
#    define ZDICTLIB_HIDDEN
#  endif
#endif

#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
#  define ZDICTLIB_API __declspec(dllexport) ZDICTLIB_VISIBLE
#elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
#  define ZDICTLIB_API __declspec(dllimport) ZDICTLIB_VISIBLE /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
#else
#  define ZDICTLIB_API ZDICTLIB_VISIBLE
#endif

/*******************************************************************************
 * Zstd dictionary builder
 *
 * FAQ
 * ===
 * Why should I use a dictionary?
 * ------------------------------
 *
 * Zstd can use dictionaries to improve compression ratio of small data.
 * Traditionally small files don't compress well because there is very little
 * repetition in a single sample, since it is small. But, if you are compressing
 * many similar files, like a bunch of JSON records that share the same
 * structure, you can train a dictionary on ahead of time on some samples of
 * these files. Then, zstd can use the dictionary to find repetitions that are
 * present across samples. This can vastly improve compression ratio.
 *
 * When is a dictionary useful?
 * ----------------------------
 *
 * Dictionaries are useful when compressing many small files that are similar.
 * The larger a file is, the less benefit a dictionary will have. Generally,
 * we don't expect dictionary compression to be effective past 100KB. And the
 * smaller a file is, the more we would expect the dictionary to help.
 *
 * How do I use a dictionary?
 * --------------------------
 *
 * Simply pass the dictionary to the zstd compressor with
 * `ZSTD_CCtx_loadDictionary()`. The same dictionary must then be passed to
 * the decompressor, using `ZSTD_DCtx_loadDictionary()`. There are other
 * more advanced functions that allow selecting some options, see zstd.h for
 * complete documentation.
 *
 * What is a zstd dictionary?
 * --------------------------
 *
 * A zstd dictionary has two pieces: Its header, and its content. The header
 * contains a magic number, the dictionary ID, and entropy tables. These
 * entropy tables allow zstd to save on header costs in the compressed file,
 * which really matters for small data. The content is just bytes, which are
 * repeated content that is common across many samples.
 *
 * What is a raw content dictionary?
 * ---------------------------------
 *
 * A raw content dictionary is just bytes. It doesn't have a zstd dictionary
 * header, a dictionary ID, or entropy tables. Any buffer is a valid raw
 * content dictionary.
 *
 * How do I train a dictionary?
 * ----------------------------
 *
 * Gather samples from your use case. These samples should be similar to each
 * other. If you have several use cases, you could try to train one dictionary
 * per use case.
 *
 * Pass those samples to `ZDICT_trainFromBuffer()` and that will train your
 * dictionary. There are a few advanced versions of this function, but this
 * is a great starting point. If you want to further tune your dictionary
 * you could try `ZDICT_optimizeTrainFromBuffer_cover()`. If that is too slow
 * you can try `ZDICT_optimizeTrainFromBuffer_fastCover()`.
 *
 * If the dictionary training function fails, that is likely because you
 * either passed too few samples, or a dictionary would not be effective
 * for your data. Look at the messages that the dictionary trainer printed,
 * if it doesn't say too few samples, then a dictionary would not be effective.
 *
 * How large should my dictionary be?
 * ----------------------------------
 *
 * A reasonable dictionary size, the `dictBufferCapacity`, is about 100KB.
 * The zstd CLI defaults to a 110KB dictionary. You likely don't need a
 * dictionary larger than that. But, most use cases can get away with a
 * smaller dictionary. The advanced dictionary builders can automatically
 * shrink the dictionary for you, and select the smallest size that doesn't
 * hurt compression ratio too much. See the `shrinkDict` parameter.
 * A smaller dictionary can save memory, and potentially speed up
 * compression.
 *
 * How many samples should I provide to the dictionary builder?
 * ------------------------------------------------------------
 *
 * We generally recommend passing ~100x the size of the dictionary
 * in samples. A few thousand should suffice. Having too few samples
 * can hurt the dictionaries effectiveness. Having more samples will
 * only improve the dictionaries effectiveness. But having too many
 * samples can slow down the dictionary builder.
 *
 * How do I determine if a dictionary will be effective?
 * -----------------------------------------------------
 *
 * Simply train a dictionary and try it out. You can use zstd's built in
 * benchmarking tool to test the dictionary effectiveness.
 *
 *   # Benchmark levels 1-3 without a dictionary
 *   zstd -b1e3 -r /path/to/my/files
 *   # Benchmark levels 1-3 with a dictionary
 *   zstd -b1e3 -r /path/to/my/files -D /path/to/my/dictionary
 *
 * When should I retrain a dictionary?
 * -----------------------------------
 *
 * You should retrain a dictionary when its effectiveness drops. Dictionary
 * effectiveness drops as the data you are compressing changes. Generally, we do
 * expect dictionaries to "decay" over time, as your data changes, but the rate
 * at which they decay depends on your use case. Internally, we regularly
 * retrain dictionaries, and if the new dictionary performs significantly
 * better than the old dictionary, we will ship the new dictionary.
 *
 * I have a raw content dictionary, how do I turn it into a zstd dictionary?
 * -------------------------------------------------------------------------
 *
 * If you have a raw content dictionary, e.g. by manually constructing it, or
 * using a third-party dictionary builder, you can turn it into a zstd
 * dictionary by using `ZDICT_finalizeDictionary()`. You'll also have to
 * provide some samples of the data. It will add the zstd header to the
 * raw content, which contains a dictionary ID and entropy tables, which
 * will improve compression ratio, and allow zstd to write the dictionary ID
 * into the frame, if you so choose.
 *
 * Do I have to use zstd's dictionary builder?
 * -------------------------------------------
 *
 * No! You can construct dictionary content however you please, it is just
 * bytes. It will always be valid as a raw content dictionary. If you want
 * a zstd dictionary, which can improve compression ratio, use
 * `ZDICT_finalizeDictionary()`.
 *
 * What is the attack surface of a zstd dictionary?
 * ------------------------------------------------
 *
 * Zstd is heavily fuzz tested, including loading fuzzed dictionaries, so
 * zstd should never crash, or access out-of-bounds memory no matter what
 * the dictionary is. However, if an attacker can control the dictionary
 * during decompression, they can cause zstd to generate arbitrary bytes,
 * just like if they controlled the compressed data.
 *
 ******************************************************************************/


/*! ZDICT_trainFromBuffer():
 *  Train a dictionary from an array of samples.
 *  Redirect towards ZDICT_optimizeTrainFromBuffer_fastCover() single-threaded, with d=8, steps=4,
 *  f=20, and accel=1.
 *  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
 *  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order.
 *  The resulting dictionary will be saved into `dictBuffer`.
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *  Note:  Dictionary training will fail if there are not enough samples to construct a
 *         dictionary, or if most of the samples are too small (< 8 bytes being the lower limit).
 *         If dictionary training fails, you should use zstd without a dictionary, as the dictionary
 *         would've been ineffective anyways. If you believe your samples would benefit from a dictionary
 *         please open an issue with details, and we can look into it.
 *  Note: ZDICT_trainFromBuffer()'s memory usage is about 6 MB.
 *  Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
 *        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`.
 *        In general, it's recommended to provide a few thousands samples, though this can vary a lot.
 *        It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
 */
ZDICTLIB_API size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
                                    const void* samplesBuffer,
                                    const size_t* samplesSizes, unsigned nbSamples);

typedef struct {
    int      compressionLevel;   /**< optimize for a specific zstd compression level; 0 means default */
    unsigned notificationLevel;  /**< Write log to stderr; 0 = none (default); 1 = errors; 2 = progression; 3 = details; 4 = debug; */
    unsigned dictID;             /**< force dictID value; 0 means auto mode (32-bits random value)
                                  *   NOTE: The zstd format reserves some dictionary IDs for future use.
                                  *         You may use them in private settings, but be warned that they
                                  *         may be used by zstd in a public dictionary registry in the future.
                                  *         These dictionary IDs are:
                                  *           - low range  : <= 32767
                                  *           - high range : >= (2^31)
                                  */
} ZDICT_params_t;

/*! ZDICT_finalizeDictionary():
 * Given a custom content as a basis for dictionary, and a set of samples,
 * finalize dictionary by adding headers and statistics according to the zstd
 * dictionary format.
 *
 * Samples must be stored concatenated in a flat buffer `samplesBuffer`,
 * supplied with an array of sizes `samplesSizes`, providing the size of each
 * sample in order. The samples are used to construct the statistics, so they
 * should be representative of what you will compress with this dictionary.
 *
 * The compression level can be set in `parameters`. You should pass the
 * compression level you expect to use in production. The statistics for each
 * compression level differ, so tuning the dictionary for the compression level
 * can help quite a bit.
 *
 * You can set an explicit dictionary ID in `parameters`, or allow us to pick
 * a random dictionary ID for you, but we can't guarantee no collisions.
 *
 * The dstDictBuffer and the dictContent may overlap, and the content will be
 * appended to the end of the header. If the header + the content doesn't fit in
 * maxDictSize the beginning of the content is truncated to make room, since it
 * is presumed that the most profitable content is at the end of the dictionary,
 * since that is the cheapest to reference.
 *
 * `maxDictSize` must be >= max(dictContentSize, ZSTD_DICTSIZE_MIN).
 *
 * @return: size of dictionary stored into `dstDictBuffer` (<= `maxDictSize`),
 *          or an error code, which can be tested by ZDICT_isError().
 * Note: ZDICT_finalizeDictionary() will push notifications into stderr if
 *       instructed to, using notificationLevel>0.
 * NOTE: This function currently may fail in several edge cases including:
 *         * Not enough samples
 *         * Samples are uncompressible
 *         * Samples are all exactly the same
 */
ZDICTLIB_API size_t ZDICT_finalizeDictionary(void* dstDictBuffer, size_t maxDictSize,
                                const void* dictContent, size_t dictContentSize,
                                const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples,
                                ZDICT_params_t parameters);


/*======   Helper functions   ======*/
ZDICTLIB_API unsigned ZDICT_getDictID(const void* dictBuffer, size_t dictSize);  /**< extracts dictID; @return zero if error (not a valid dictionary) */
ZDICTLIB_API size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize);  /* returns dict header size; returns a ZSTD error code on failure */
ZDICTLIB_API unsigned ZDICT_isError(size_t errorCode);
ZDICTLIB_API const char* ZDICT_getErrorName(size_t errorCode);

#endif   /* ZSTD_ZDICT_H */

#if defined(ZDICT_STATIC_LINKING_ONLY) && !defined(ZSTD_ZDICT_H_STATIC)
#define ZSTD_ZDICT_H_STATIC

/* This can be overridden externally to hide static symbols. */
#ifndef ZDICTLIB_STATIC_API
#  if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
#    define ZDICTLIB_STATIC_API __declspec(dllexport) ZDICTLIB_VISIBLE
#  elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
#    define ZDICTLIB_STATIC_API __declspec(dllimport) ZDICTLIB_VISIBLE
#  else
#    define ZDICTLIB_STATIC_API ZDICTLIB_VISIBLE
#  endif
#endif

/* ====================================================================================
 * The definitions in this section are considered experimental.
 * They should never be used with a dynamic library, as they may change in the future.
 * They are provided for advanced usages.
 * Use them only in association with static linking.
 * ==================================================================================== */

#define ZDICT_DICTSIZE_MIN    256
/* Deprecated: Remove in v1.6.0 */
#define ZDICT_CONTENTSIZE_MIN 128

/*! ZDICT_cover_params_t:
 *  k and d are the only required parameters.
 *  For others, value 0 means default.
 */
typedef struct {
    unsigned k;                  /* Segment size : constraint: 0 < k : Reasonable range [16, 2048+] */
    unsigned d;                  /* dmer size : constraint: 0 < d <= k : Reasonable range [6, 16] */
    unsigned steps;              /* Number of steps : Only used for optimization : 0 means default (40) : Higher means more parameters checked */
    unsigned nbThreads;          /* Number of threads : constraint: 0 < nbThreads : 1 means single-threaded : Only used for optimization : Ignored if ZSTD_MULTITHREAD is not defined */
    double splitPoint;           /* Percentage of samples used for training: Only used for optimization : the first nbSamples * splitPoint samples will be used to training, the last nbSamples * (1 - splitPoint) samples will be used for testing, 0 means default (1.0), 1.0 when all samples are used for both training and testing */
    unsigned shrinkDict;         /* Train dictionaries to shrink in size starting from the minimum size and selects the smallest dictionary that is shrinkDictMaxRegression% worse than the largest dictionary. 0 means no shrinking and 1 means shrinking  */
    unsigned shrinkDictMaxRegression; /* Sets shrinkDictMaxRegression so that a smaller dictionary can be at worse shrinkDictMaxRegression% worse than the max dict size dictionary. */
    ZDICT_params_t zParams;
} ZDICT_cover_params_t;

typedef struct {
    unsigned k;                  /* Segment size : constraint: 0 < k : Reasonable range [16, 2048+] */
    unsigned d;                  /* dmer size : constraint: 0 < d <= k : Reasonable range [6, 16] */
    unsigned f;                  /* log of size of frequency array : constraint: 0 < f <= 31 : 1 means default(20)*/
    unsigned steps;              /* Number of steps : Only used for optimization : 0 means default (40) : Higher means more parameters checked */
    unsigned nbThreads;          /* Number of threads : constraint: 0 < nbThreads : 1 means single-threaded : Only used for optimization : Ignored if ZSTD_MULTITHREAD is not defined */
    double splitPoint;           /* Percentage of samples used for training: Only used for optimization : the first nbSamples * splitPoint samples will be used to training, the last nbSamples * (1 - splitPoint) samples will be used for testing, 0 means default (0.75), 1.0 when all samples are used for both training and testing */
    unsigned accel;              /* Acceleration level: constraint: 0 < accel <= 10, higher means faster and less accurate, 0 means default(1) */
    unsigned shrinkDict;         /* Train dictionaries to shrink in size starting from the minimum size and selects the smallest dictionary that is shrinkDictMaxRegression% worse than the largest dictionary. 0 means no shrinking and 1 means shrinking  */
    unsigned shrinkDictMaxRegression; /* Sets shrinkDictMaxRegression so that a smaller dictionary can be at worse shrinkDictMaxRegression% worse than the max dict size dictionary. */

    ZDICT_params_t zParams;
} ZDICT_fastCover_params_t;

/*! ZDICT_trainFromBuffer_cover():
 *  Train a dictionary from an array of samples using the COVER algorithm.
 *  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
 *  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order.
 *  The resulting dictionary will be saved into `dictBuffer`.
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *          See ZDICT_trainFromBuffer() for details on failure modes.
 *  Note: ZDICT_trainFromBuffer_cover() requires about 9 bytes of memory for each input byte.
 *  Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
 *        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`.
 *        In general, it's recommended to provide a few thousands samples, though this can vary a lot.
 *        It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
 */
ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_cover(
          void *dictBuffer, size_t dictBufferCapacity,
    const void *samplesBuffer, const size_t *samplesSizes, unsigned nbSamples,
          ZDICT_cover_params_t parameters);

/*! ZDICT_optimizeTrainFromBuffer_cover():
 * The same requirements as above hold for all the parameters except `parameters`.
 * This function tries many parameter combinations and picks the best parameters.
 * `*parameters` is filled with the best parameters found,
 * dictionary constructed with those parameters is stored in `dictBuffer`.
 *
 * All of the parameters d, k, steps are optional.
 * If d is non-zero then we don't check multiple values of d, otherwise we check d = {6, 8}.
 * if steps is zero it defaults to its default value.
 * If k is non-zero then we don't check multiple values of k, otherwise we check steps values in [50, 2000].
 *
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *          On success `*parameters` contains the parameters selected.
 *          See ZDICT_trainFromBuffer() for details on failure modes.
 * Note: ZDICT_optimizeTrainFromBuffer_cover() requires about 8 bytes of memory for each input byte and additionally another 5 bytes of memory for each byte of memory for each thread.
 */
ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_cover(
          void* dictBuffer, size_t dictBufferCapacity,
    const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples,
          ZDICT_cover_params_t* parameters);

/*! ZDICT_trainFromBuffer_fastCover():
 *  Train a dictionary from an array of samples using a modified version of COVER algorithm.
 *  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
 *  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order.
 *  d and k are required.
 *  All other parameters are optional, will use default values if not provided
 *  The resulting dictionary will be saved into `dictBuffer`.
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *          See ZDICT_trainFromBuffer() for details on failure modes.
 *  Note: ZDICT_trainFromBuffer_fastCover() requires 6 * 2^f bytes of memory.
 *  Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
 *        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`.
 *        In general, it's recommended to provide a few thousands samples, though this can vary a lot.
 *        It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
 */
ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_fastCover(void *dictBuffer,
                    size_t dictBufferCapacity, const void *samplesBuffer,
                    const size_t *samplesSizes, unsigned nbSamples,
                    ZDICT_fastCover_params_t parameters);

/*! ZDICT_optimizeTrainFromBuffer_fastCover():
 * The same requirements as above hold for all the parameters except `parameters`.
 * This function tries many parameter combinations (specifically, k and d combinations)
 * and picks the best parameters. `*parameters` is filled with the best parameters found,
 * dictionary constructed with those parameters is stored in `dictBuffer`.
 * All of the parameters d, k, steps, f, and accel are optional.
 * If d is non-zero then we don't check multiple values of d, otherwise we check d = {6, 8}.
 * if steps is zero it defaults to its default value.
 * If k is non-zero then we don't check multiple values of k, otherwise we check steps values in [50, 2000].
 * If f is zero, default value of 20 is used.
 * If accel is zero, default value of 1 is used.
 *
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *          On success `*parameters` contains the parameters selected.
 *          See ZDICT_trainFromBuffer() for details on failure modes.
 * Note: ZDICT_optimizeTrainFromBuffer_fastCover() requires about 6 * 2^f bytes of memory for each thread.
 */
ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_fastCover(void* dictBuffer,
                    size_t dictBufferCapacity, const void* samplesBuffer,
                    const size_t* samplesSizes, unsigned nbSamples,
                    ZDICT_fastCover_params_t* parameters);

typedef struct {
    unsigned selectivityLevel;   /* 0 means default; larger => select more => larger dictionary */
    ZDICT_params_t zParams;
} ZDICT_legacy_params_t;

/*! ZDICT_trainFromBuffer_legacy():
 *  Train a dictionary from an array of samples.
 *  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
 *  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order.
 *  The resulting dictionary will be saved into `dictBuffer`.
 * `parameters` is optional and can be provided with values set to 0 to mean "default".
 * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
 *          or an error code, which can be tested with ZDICT_isError().
 *          See ZDICT_trainFromBuffer() for details on failure modes.
 *  Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
 *        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`.
 *        In general, it's recommended to provide a few thousands samples, though this can vary a lot.
 *        It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
 *  Note: ZDICT_trainFromBuffer_legacy() will send notifications into stderr if instructed to, using notificationLevel>0.
 */
ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_legacy(
    void* dictBuffer, size_t dictBufferCapacity,
    const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples,
    ZDICT_legacy_params_t parameters);


/* Deprecation warnings */
/* It is generally possible to disable deprecation warnings from compiler,
   for example with -Wno-deprecated-declarations for gcc
   or _CRT_SECURE_NO_WARNINGS in Visual.
   Otherwise, it's also possible to manually define ZDICT_DISABLE_DEPRECATE_WARNINGS */
#ifdef ZDICT_DISABLE_DEPRECATE_WARNINGS
#  define ZDICT_DEPRECATED(message) /* disable deprecation warnings */
#else
#  define ZDICT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
#  if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */
#    define ZDICT_DEPRECATED(message) [[deprecated(message)]]
#  elif defined(__clang__) || (ZDICT_GCC_VERSION >= 405)
#    define ZDICT_DEPRECATED(message) __attribute__((deprecated(message)))
#  elif (ZDICT_GCC_VERSION >= 301)
#    define ZDICT_DEPRECATED(message) __attribute__((deprecated))
#  elif defined(_MSC_VER)
#    define ZDICT_DEPRECATED(message) __declspec(deprecated(message))
#  else
#    pragma message("WARNING: You need to implement ZDICT_DEPRECATED for this compiler")
#    define ZDICT_DEPRECATED(message)
#  endif
#endif /* ZDICT_DISABLE_DEPRECATE_WARNINGS */

ZDICT_DEPRECATED("use ZDICT_finalizeDictionary() instead")
ZDICTLIB_STATIC_API
size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity,
                                  const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);


#endif   /* ZSTD_ZDICT_H_STATIC */

#if defined (__cplusplus)
}
#endif

Directory Contents

Dirs: 54 × Files: 161

Name Size Perms Modified Actions
arpa DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
asm DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
bits DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
bsock DIR
- drwxr-xr-x 2024-10-10 12:53:39
Edit Download
c++ DIR
- drwxr-xr-x 2025-09-15 15:41:50
Edit Download
criu DIR
- drwxr-xr-x 2026-06-04 09:57:48
Edit Download
curl DIR
- drwxr-xr-x 2026-03-10 18:10:35
Edit Download
drm DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
et DIR
- drwxr-xr-x 2026-03-10 18:22:09
Edit Download
finclude DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
fwctl DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
gdb DIR
- drwxr-xr-x 2026-03-10 18:21:15
Edit Download
gnu DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
google DIR
- drwxr-xr-x 2026-06-03 15:11:46
Edit Download
gssapi DIR
- drwxr-xr-x 2026-06-04 09:17:34
Edit Download
gssrpc DIR
- drwxr-xr-x 2026-06-04 09:17:34
Edit Download
kadm5 DIR
- drwxr-xr-x 2026-06-04 09:17:34
Edit Download
krb5 DIR
- drwxr-xr-x 2026-06-04 09:17:34
Edit Download
libxml2 DIR
- drwxr-xr-x 2025-12-01 03:41:00
Edit Download
linux DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
lzma DIR
- drwxr-xr-x 2024-10-10 13:04:07
Edit Download
misc DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
mtd DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
mysql DIR
- drwxr-xr-x 2024-10-10 12:44:51
Edit Download
net DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netash DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netatalk DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netax25 DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
neteconet DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netinet DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netipx DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netiucv DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netpacket DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netrom DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
netrose DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
nfs DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
nghttp2 DIR
- drwxr-xr-x 2026-06-03 15:11:01
Edit Download
offload DIR
- drwxr-xr-x 2026-04-30 11:58:46
Edit Download
openssl DIR
- drwxr-xr-x 2026-03-10 18:22:22
Edit Download
pcp DIR
- drwxr-xr-x 2026-03-10 18:18:44
Edit Download
- drwxr-xr-x 2026-06-03 15:11:46
Edit Download
protocols DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
python3.9 DIR
- drwxr-xr-x 2026-06-03 15:11:46
Edit Download
rdma DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
rpc DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
sasl DIR
- drwxr-xr-x 2026-03-31 19:13:44
Edit Download
scsi DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
selinux DIR
- drwxr-xr-x 2025-10-20 12:56:30
Edit Download
sepol DIR
- drwxr-xr-x 2026-03-10 18:22:09
Edit Download
sound DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
sys DIR
- drwxr-xr-x 2026-08-12 11:53:26
Edit Download
video DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
xen DIR
- drwxr-xr-x 2026-06-03 15:05:14
Edit Download
4.25 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
7.56 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
1.98 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
1.17 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
1.69 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
24.95 KB lrw-r--r-- 2026-08-03 10:12:04
Edit Download
5.91 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
4.46 KB lrw-r--r-- 2026-08-03 10:11:42
Edit Download
1.42 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
7.95 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
2.07 KB lrw-r--r-- 2021-12-30 05:54:33
Edit Download
2.21 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
931 B lrw-r--r-- 2026-05-19 19:43:42
Edit Download
10.90 KB lrw-r--r-- 2022-02-10 04:05:00
Edit Download
10.71 KB lrw-r--r-- 2026-08-03 10:11:42
Edit Download
12.32 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
8.60 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
178.26 KB lrw-r--r-- 2026-08-03 10:12:06
Edit Download
2.25 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
2.80 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
2.29 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
1.64 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
2.36 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
1.49 KB lrw-r--r-- 2026-08-03 10:12:04
Edit Download
11.17 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
1.37 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
17.69 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
5.65 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
6.73 KB lrw-r--r-- 2022-01-30 08:23:38
Edit Download
3.16 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
2.24 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
3.50 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
3.04 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
9.35 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
6.19 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
4.11 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
11.14 KB lrw-r--r-- 2025-04-25 20:16:30
Edit Download
17.42 KB lrw-r--r-- 2018-01-17 19:23:18
Edit Download
2.24 KB lrw-r--r-- 2018-01-17 19:23:18
Edit Download
1.43 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
7.13 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
2.29 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
2.84 KB lrw-r--r-- 2020-01-03 07:11:27
Edit Download
6.53 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
4.42 KB lrw-r--r-- 2026-08-03 10:12:04
Edit Download
181 B lrw-r--r-- 2023-07-10 20:58:20
Edit Download
1.81 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
13.57 KB lrw-r--r-- 2022-02-09 20:58:30
Edit Download
4.80 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
2.77 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
8.14 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
62.83 KB lrw-r--r-- 2026-04-21 16:53:17
Edit Download
11.52 KB lrw-r--r-- 2023-04-05 19:15:53
Edit Download
8.72 KB lrw-r--r-- 2023-07-10 20:58:20
Edit Download
402 B lrw-r--r-- 2023-07-10 20:58:20
Edit Download
17.43 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
126 B lrw-r--r-- 2026-08-03 10:12:06
Edit Download
9.10 KB lrw-r--r-- 2023-09-26 18:28:33
Edit Download
15.12 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
1.43 KB lrw-r--r-- 2025-03-13 12:28:31
Edit Download
72.36 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
9.24 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
1.55 KB lrw-r--r-- 2025-03-13 12:28:31
Edit Download
9.23 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
3.39 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
4.68 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
20.31 KB lrw-r--r-- 2025-04-25 20:16:30
Edit Download
1.35 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
4.47 KB lrw-r--r-- 2026-08-03 10:11:42
Edit Download
569 B lrw-r--r-- 2026-05-14 12:36:49
Edit Download
5.66 KB lrw-r--r-- 2022-02-10 03:17:35
Edit Download
59.24 KB lrw-r--r-- 2024-10-16 08:03:21
Edit Download
4.83 KB lrw-r--r-- 2024-10-16 08:03:21
Edit Download
16.96 KB lrw-r--r-- 2024-10-16 08:03:21
Edit Download
5.57 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
7.62 KB lrw-r--r-- 2026-08-03 10:12:06
Edit Download
7.50 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
4.85 KB lrw-r--r-- 2026-05-14 12:36:49
Edit Download
25.36 KB lrw-r--r-- 2026-05-14 12:36:49
Edit Download
599 B lrw-r--r-- 2026-05-14 12:36:49
Edit Download
15.45 KB lrw-r--r-- 2023-09-26 18:28:33
Edit Download
191 B lrw-r--r-- 2023-09-26 18:28:33
Edit Download
21.01 KB lrw-r--r-- 2023-09-26 18:28:33
Edit Download
1.62 KB lrw-r--r-- 2023-09-26 17:46:00
Edit Download
1.09 KB lrw-r--r-- 2023-09-26 18:28:33
Edit Download
9.63 KB lrw-r--r-- 2020-03-17 14:28:50
Edit Download
5.77 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
47.63 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
2.38 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
956 B lrw-r--r-- 2026-08-03 10:11:45
Edit Download
3.28 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
1.92 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
4.50 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
27.79 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
1.56 KB lrw-r--r-- 2025-04-25 20:16:30
Edit Download
1.71 KB lrw-r--r-- 2026-08-03 10:11:42
Edit Download
14.07 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
20.81 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
964 B lrw-r--r-- 2024-05-21 17:19:11
Edit Download
2.91 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
46.15 KB lrw-r--r-- 2024-10-02 21:57:27
Edit Download
6.52 KB lrw-r--r-- 2021-08-20 16:51:28
Edit Download
22 B lrw-r--r-- 2026-08-03 10:11:45
Edit Download
1.62 KB lrw-r--r-- 2026-05-19 19:43:42
Edit Download
6.71 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
3.40 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
11.87 KB lrw-r--r-- 2026-04-21 16:53:37
Edit Download
47.39 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
1.53 KB lrw-r--r-- 2026-08-03 10:12:06
Edit Download
6.17 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
25.30 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
1.41 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
12.10 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
963 B lrw-r--r-- 2026-08-03 10:11:45
Edit Download
4.92 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
5.32 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
3.38 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
3.12 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
1.31 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
5.34 KB lrw-r--r-- 2026-08-03 10:12:04
Edit Download
12.73 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
37.45 KB lrw-r--r-- 2024-05-21 17:19:11
Edit Download
8.10 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
264 B lrw-r--r-- 2026-08-03 10:11:46
Edit Download
2.24 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
8.28 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
30.67 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
2.73 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
35.46 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
19.00 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
4.64 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
25 B lrw-r--r-- 2026-08-03 10:11:46
Edit Download
5.11 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
24 B lrw-r--r-- 2026-08-03 10:11:46
Edit Download
3.70 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
214 B lrw-r--r-- 2026-08-03 10:11:46
Edit Download
3.51 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
39.24 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
7.51 KB lrw-r--r-- 2026-08-03 10:11:44
Edit Download
15.65 KB lrw-r--r-- 2026-08-03 10:12:05
Edit Download
14.50 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
2.44 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
1.96 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
1.99 KB lrw-r--r-- 2026-08-03 10:11:43
Edit Download
1.55 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
43.45 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
1.86 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
3.15 KB lrw-r--r-- 2026-08-03 10:12:06
Edit Download
4.00 KB lrw-r--r-- 2026-08-03 10:12:06
Edit Download
1.91 KB lrw-r--r-- 2026-08-03 10:11:40
Edit Download
6.48 KB lrw-r--r-- 2022-02-10 04:33:39
Edit Download
18.98 KB lrw-r--r-- 2022-02-10 04:33:39
Edit Download
22 B lrw-r--r-- 2026-08-03 10:11:45
Edit Download
31.39 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
5.42 KB lrw-r--r-- 2026-08-03 10:11:46
Edit Download
2.44 KB lrw-r--r-- 2026-08-03 10:11:45
Edit Download
15.88 KB lrw-r--r-- 2023-09-26 09:22:15
Edit Download
25.81 KB lrw-r--r-- 2023-04-04 20:13:52
Edit Download
94.00 KB lrw-r--r-- 2023-09-26 09:22:15
Edit Download
167.36 KB lrw-r--r-- 2023-04-04 20:13:52
Edit Download
4.43 KB lrw-r--r-- 2023-04-04 20:13:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
 !"#$%&'(()*+,-./00123456789 t\ wIDATx ]ys  47Y ƒ -  "  Rv  < f{Ɛ $k l L > L  ~h^ 1  [  r G t& h  l F z3O Y ! p A(_g̷ E8 )S 8 c  Kb"z ~ 5 J xAL WU <  *  5 m;W a pB h ~P J 2 3 6 ҙ .Ƹ P i  4g F R L P ΪK/D  M v (a3 k J Œ4N5* SH ` SdJ z  O J Xՠ V>u ߱ BE&L b2 ?2` tX+  c CB A$ i b C ĀMB E : /  # Dx &l =q Ty  0 \p I ( L Ǎ { e 4k ;`u^ヲ eP!( d {  )T A 8 O;Ě n >;s6 !  :Nx `[S D HU ~ q›J F} a g*D 49 / pn k h (t 8NxƐF _!r չ7 ZR R׷ q/5") Ӎ NY 0 x sZ!   o  fu  ,  K"$ ? pg  㕣=  1» {h " fh7    y  } € +7  $ y " X —ą - G P u 4 m >J 5 L =V ' ^@I p ?MS xЌ XV P ! h "C NS9B8̢ ]!K  e   zA , ӏkbY  !< XQ ٿyS| *" f { w  4@[S <  # 0 ! js [m  =,~ o "ݎ DHf Wo $ g ! Vԅ t mB /y Wf V4񺍸 c+@x?  B ~u " xUN e 0 BĂ) ~J pz! 7y6]l Ԥ@ P a< O /DHC `≻  N m"$  0ObB }{ x AO FCG D R ^ "B  { WDH  UR l@ T #  +"d T ; 0 i  D}. 7 ` ' ] w rE &S i ƕiTD EL P _ u h $ Ա FG wVD G L R Zf ' .!] J /ZR oGЍs Mr Ĥ ʬ 3 Q [3 cL ` ^ p + ( F;# B 5 '  2Y f [  ϶R0e }  E 7 6M aۮ H <& n % L] E}Up x紉, Uw' Q  Ǯշo k ވۙ 0N94 VX5 xEDE l D #֤ } C o )W :  ^ s 9  bRf iX5u ཱི 4 :[  T 1. | [E 2ؽ Iy\ : o x K G 5 ylP ' uK E ftb/i[3 .g _  [3M n G, #NwQ5~  ؚ) | n =Ц"x qg gB ` 듘 ~ x w ? ? R~  _ u. &VQ K˻   H C ( TN˄+ `C dA nB׭ D 3"Z G ê ^k H_ /- ~ " R_  .8 Z_ 6@ o  xg  uP ? 3լ @7AM!  E7^ - =V L  x  g-D0  CtmW 7  O  G _ WD0 g C  w1 r d w : a | \  *" f nֳ ^ H# f L ` Z ۽hV  }S F r0Ù Bć5r] @! NL iQ]{s^=4 d  WD  "  "   M; t" 8 5 e dL| "-*st" ) SWD ?R[S e ooF  20.D ? bo =) A i o d ģ ZҰaO @E =) i D a &ܟa CϞ y6 ,<%{^x%{f8? `iw^ ?/ M * IEND B`