Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
zstreamtest.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include "timefn.h"
#include "mem.h"
#include "zstd.h"
#include "zstd_errors.h"
#include "zdict.h"
#include "datagen.h"
#include "xxhash.h"
#include "seqgen.h"
#include "util.h"
#include "external_matchfinder.h"

Data Structures

struct  buffer_t
 

Macros

#define ZSTD_DISABLE_DEPRECATE_WARNINGS   /* No deprecation warnings, we still test some deprecated functions */
 
#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_maxCLevel, ZSTD_customMem, ZSTD_getDictID_fromFrame */
 
#define XXH_STATIC_LINKING_ONLY   /* XXH64_state_t */
 
#define KB   *(1U<<10)
 
#define MB   *(1U<<20)
 
#define GB   *(1U<<30)
 
#define COMPRESSIBLE_NOISE_LENGTH   (10 MB)
 
#define FUZ_COMPRESSIBILITY_DEFAULT   50
 
#define DISPLAY(...)
 
#define DISPLAYLEVEL(l, ...)
 
#define DISPLAYUPDATE(l, ...)
 
#define MIN(a, b)
 
#define MAX(a, b)
 
#define FUZ_rotl32(x, r)
 
#define CHECK(cond, ...)
 
#define CHECK_Z(f)
 
#define CHECK_RET(ret, cond, ...)
 
#define CHECK_RET_Z(f)
 

Enumerations

enum  e_api { simple_api , advanced_api }
 

Functions

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

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond,
... )
Value:
{ \
if (cond) { \
DISPLAY("Error => "); \
DISPLAY(__VA_ARGS__); \
DISPLAY(" (seed %u, test nb %u, line %u) \n", \
(unsigned)seed, testNb, __LINE__); \
goto _output_error; \
} }
uint32_t seed
Definition stream_decompress.c:26

◆ CHECK_RET

#define CHECK_RET ( ret,
cond,
... )
Value:
{ \
if (cond) { \
DISPLAY("Error %llu => ", (unsigned long long)ret); \
DISPLAY(__VA_ARGS__); \
DISPLAY(" (line %u)\n", __LINE__); \
return ret; \
} }
ret
Definition zlib_interface.c:30

◆ CHECK_RET_Z

#define CHECK_RET_Z ( f)
Value:
{ \
size_t const err = f; \
CHECK_RET(err, ZSTD_isError(err), "%s : %s ", \
#f, ZSTD_getErrorName(err)); \
}
#define f(i)
Definition sha256.c:46
const char * ZSTD_getErrorName(size_t code)
Definition zstd_common.c:41
#define ZSTD_isError
Definition zstd_internal.h:49

◆ CHECK_Z

#define CHECK_Z ( f)
Value:
{ \
size_t const err = f; \
CHECK(ZSTD_isError(err), "%s : %s ", \
#f, ZSTD_getErrorName(err)); \
}

◆ COMPRESSIBLE_NOISE_LENGTH

#define COMPRESSIBLE_NOISE_LENGTH   (10 MB)

◆ DISPLAY

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

◆ DISPLAYLEVEL

#define DISPLAYLEVEL ( l,
... )
Value:
if (g_displayLevel>=l) { \
DISPLAY(__VA_ARGS__); \
if (g_displayLevel>=4) fflush(stderr); }

◆ DISPLAYUPDATE

#define DISPLAYUPDATE ( l,
... )
Value:
if (g_displayLevel>=l) { \
if ((UTIL_clockSpanMicro(g_displayClock) > g_refreshRate) || (g_displayLevel>=4)) \
{ g_displayClock = UTIL_getTime(); DISPLAY(__VA_ARGS__); \
if (g_displayLevel>=4) fflush(stderr); } }
PTime UTIL_clockSpanMicro(UTIL_time_t clockStart)
Definition timefn.c:149
UTIL_time_t UTIL_getTime(void)
Definition timefn.c:140
#define DISPLAY(...)
Definition zstreamtest.c:61
UTIL_time_t g_displayClock
Definition fileio.c:48

◆ FUZ_COMPRESSIBILITY_DEFAULT

#define FUZ_COMPRESSIBILITY_DEFAULT   50

◆ FUZ_rotl32

#define FUZ_rotl32 ( x,
r )
Value:
((x << r) | (x >> (32 - r)))

FUZ_rand() :

Returns
: a 27 bits random value, from a 32-bits seed. seed is also modified

◆ GB

#define GB   *(1U<<30)

◆ KB

#define KB   *(1U<<10)

◆ MAX

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

◆ MB

#define MB   *(1U<<20)

◆ MIN

#define MIN ( a,
b )
Value:
((a)<(b)?(a):(b))

◆ XXH_STATIC_LINKING_ONLY

#define XXH_STATIC_LINKING_ONLY   /* XXH64_state_t */

◆ ZSTD_DISABLE_DEPRECATE_WARNINGS

#define ZSTD_DISABLE_DEPRECATE_WARNINGS   /* No deprecation warnings, we still test some deprecated functions */

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_maxCLevel, ZSTD_customMem, ZSTD_getDictID_fromFrame */

Enumeration Type Documentation

◆ e_api

enum e_api
Enumerator
simple_api 
advanced_api 

Function Documentation

◆ main()

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