Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
largeNbDicts.c File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <assert.h>
#include "util.h"
#include "benchfn.h"
#include "zstd.h"
#include "zdict.h"

Data Structures

struct  buffer_t
 
struct  slice_collection_t
 
struct  buffer_collection_t
 
struct  ddict_collection_t
 
struct  cdict_collection_t
 
struct  compressInstructions
 
struct  decompressInstructions
 

Macros

#define ZSTD_STATIC_LINKING_ONLY
 
#define KB   *(1<<10)
 
#define MB   *(1<<20)
 
#define BLOCKSIZE_DEFAULT   0 /* no slicing into blocks */
 
#define DICTSIZE   (4 KB)
 
#define CLEVEL_DEFAULT   3
 
#define BENCH_TIME_DEFAULT_S   6
 
#define RUN_TIME_DEFAULT_MS   1000
 
#define BENCH_TIME_DEFAULT_MS   (BENCH_TIME_DEFAULT_S * RUN_TIME_DEFAULT_MS)
 
#define DISPLAY_LEVEL_DEFAULT   3
 
#define BENCH_SIZE_MAX   (1200 MB)
 
#define CONTROL(c)
 
#define MIN(a, b)
 
#define DISPLAY(...)
 
#define DISPLAYLEVEL(l, ...)
 

Functions

void shrinkSizes (slice_collection_t collection, const size_t *newSizes)
 
void shuffleCDictionaries (cdict_collection_t dicts)
 
void shuffleDDictionaries (ddict_collection_t dicts)
 
compressInstructions createCompressInstructions (cdict_collection_t dictionaries)
 
void freeCompressInstructions (compressInstructions ci)
 
decompressInstructions createDecompressInstructions (ddict_collection_t dictionaries)
 
void freeDecompressInstructions (decompressInstructions di)
 
size_t compress (const void *src, size_t srcSize, void *dst, size_t dstCapacity, void *payload)
 
size_t decompress (const void *src, size_t srcSize, void *dst, size_t dstCapacity, void *payload)
 
int bench (const char **fileNameTable, unsigned nbFiles, const char *dictionary, size_t blockSize, int clevel, unsigned nbDictMax, unsigned nbBlocks, unsigned nbRounds, int benchCompression, int dedicatedDictSearch)
 
int usage (const char *exeName)
 
int bad_usage (const char *exeName)
 
int main (int argc, const char **argv)
 

Macro Definition Documentation

◆ BENCH_SIZE_MAX

#define BENCH_SIZE_MAX   (1200 MB)

◆ BENCH_TIME_DEFAULT_MS

#define BENCH_TIME_DEFAULT_MS   (BENCH_TIME_DEFAULT_S * RUN_TIME_DEFAULT_MS)

◆ BENCH_TIME_DEFAULT_S

#define BENCH_TIME_DEFAULT_S   6

◆ BLOCKSIZE_DEFAULT

#define BLOCKSIZE_DEFAULT   0 /* no slicing into blocks */

◆ CLEVEL_DEFAULT

#define CLEVEL_DEFAULT   3

◆ CONTROL

#define CONTROL ( c)
Value:
{ if (!(c)) abort(); }
#define c(i)
Definition sha256.c:43

◆ DICTSIZE

#define DICTSIZE   (4 KB)

◆ DISPLAY

#define DISPLAY ( ...)
Value:
fprintf(stdout, __VA_ARGS__)

◆ DISPLAY_LEVEL_DEFAULT

#define DISPLAY_LEVEL_DEFAULT   3

◆ DISPLAYLEVEL

#define DISPLAYLEVEL ( l,
... )
Value:
{ if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); } }
#define DISPLAY(...)
Definition largeNbDicts.c:61

◆ KB

#define KB   *(1<<10)

◆ MB

#define MB   *(1<<20)

◆ MIN

#define MIN ( a,
b )
Value:
((a) < (b) ? (a) : (b))
#define b(i)
Definition sha256.c:42
#define a(i)
Definition sha256.c:41

◆ RUN_TIME_DEFAULT_MS

#define RUN_TIME_DEFAULT_MS   1000

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY

Function Documentation

◆ bad_usage()

int bad_usage ( const char * exeName)

◆ bench()

int bench ( const char ** fileNameTable,
unsigned nbFiles,
const char * dictionary,
size_t blockSize,
int clevel,
unsigned nbDictMax,
unsigned nbBlocks,
unsigned nbRounds,
int benchCompression,
int dedicatedDictSearch )

bench() : fileName : file to load for benchmarking purpose dictionary : optional (can be NULL), file to load as dictionary, if none provided : will be calculated on the fly by the program.

Returns
: 0 is success, 1+ otherwise

◆ compress()

size_t compress ( const void * src,
size_t srcSize,
void * dst,
size_t dstCapacity,
void * payload )

◆ createCompressInstructions()

compressInstructions createCompressInstructions ( cdict_collection_t dictionaries)

◆ createDecompressInstructions()

decompressInstructions createDecompressInstructions ( ddict_collection_t dictionaries)

◆ decompress()

size_t decompress ( const void * src,
size_t srcSize,
void * dst,
size_t dstCapacity,
void * payload )

◆ freeCompressInstructions()

void freeCompressInstructions ( compressInstructions ci)

◆ freeDecompressInstructions()

void freeDecompressInstructions ( decompressInstructions di)

◆ main()

int main ( int argc,
const char ** argv )

◆ shrinkSizes()

void shrinkSizes ( slice_collection_t collection,
const size_t * newSizes )

◆ shuffleCDictionaries()

void shuffleCDictionaries ( cdict_collection_t dicts)

◆ shuffleDDictionaries()

void shuffleDDictionaries ( ddict_collection_t dicts)

◆ usage()

int usage ( const char * exeName)