Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
fuzzer.c File Reference
#include "platform.h"
#include "util.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <limits.h>
#include "lz4.h"
#include "lz4hc.h"
#include "xxhash.h"

Macros

#define LZ4_DISABLE_DEPRECATE_WARNINGS   /* LZ4_decompress_fast */
 
#define LZ4_STATIC_LINKING_ONLY
 
#define LZ4_HC_STATIC_LINKING_ONLY
 
#define XXH_STATIC_LINKING_ONLY
 
#define NB_ATTEMPTS   (1<<16)
 
#define COMPRESSIBLE_NOISE_LENGTH   (1 << 21)
 
#define FUZ_MAX_BLOCK_SIZE   (1 << 17)
 
#define FUZ_MAX_DICT_SIZE   (1 << 15)
 
#define FUZ_COMPRESSIBILITY_DEFAULT   60
 
#define PRIME1   2654435761U
 
#define PRIME2   2246822519U
 
#define PRIME3   3266489917U
 
#define KB   *(1U<<10)
 
#define MB   *(1U<<20)
 
#define GB   *(1U<<30)
 
#define DISPLAY(...)
 
#define DISPLAYLEVEL(l, ...)
 
#define MIN(a, b)
 
#define FUZ_RAND15BITS   ((FUZ_rand(seed) >> 3) & 32767)
 
#define FUZ_RANDLENGTH   ( ((FUZ_rand(seed) >> 7) & 3) ? (FUZ_rand(seed) % 15) : (FUZ_rand(seed) % 510) + 15)
 
#define MAX_NB_BUFF_I134   150
 
#define BLOCKSIZE_I134   (32 MB)
 
#define EXIT_MSG(...)
 
#define FUZ_CHECKTEST(cond, ...)
 
#define FUZ_DISPLAYTEST(...)
 
#define testInputSize   (196 KB)
 
#define testCompressedSize   (130 KB)
 
#define ringBufferSize   (8 KB)
 
#define BSIZE1   (dBufferSize - (maxMessageSize-1))
 

Typedefs

typedef size_t uintptr_t
 

Functions

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

Macro Definition Documentation

◆ BLOCKSIZE_I134

#define BLOCKSIZE_I134   (32 MB)

◆ BSIZE1

#define BSIZE1   (dBufferSize - (maxMessageSize-1))

◆ COMPRESSIBLE_NOISE_LENGTH

#define COMPRESSIBLE_NOISE_LENGTH   (1 << 21)

◆ DISPLAY

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

◆ DISPLAYLEVEL

#define DISPLAYLEVEL ( l,
... )
Value:
do { if (g_displayLevel>=l) DISPLAY(__VA_ARGS__); } while (0)
#define DISPLAY(...)
Definition fuzzer.c:95

◆ EXIT_MSG

#define EXIT_MSG ( ...)
Value:
do { \
printf("Test %u : ", testNb); printf(__VA_ARGS__); \
printf(" (seed %u, cycle %u) \n", seed, cycleNb); \
exit(1); \
} while (0)
uint32_t seed
Definition stream_decompress.c:26

◆ FUZ_CHECKTEST

#define FUZ_CHECKTEST ( cond,
... )
Value:
do { if (cond) EXIT_MSG(__VA_ARGS__); } while (0)
#define EXIT_MSG(...)

◆ FUZ_COMPRESSIBILITY_DEFAULT

#define FUZ_COMPRESSIBILITY_DEFAULT   60

◆ FUZ_DISPLAYTEST

#define FUZ_DISPLAYTEST ( ...)
Value:
do { \
testNb++; \
if (g_displayLevel>=4) { \
printf("\r%4u - %2u :", cycleNb, testNb); \
printf(" " __VA_ARGS__); \
printf(" "); \
fflush(stdout); \
} \
} while (0)

◆ FUZ_MAX_BLOCK_SIZE

#define FUZ_MAX_BLOCK_SIZE   (1 << 17)

◆ FUZ_MAX_DICT_SIZE

#define FUZ_MAX_DICT_SIZE   (1 << 15)

◆ FUZ_RAND15BITS

#define FUZ_RAND15BITS   ((FUZ_rand(seed) >> 3) & 32767)

◆ FUZ_RANDLENGTH

#define FUZ_RANDLENGTH   ( ((FUZ_rand(seed) >> 7) & 3) ? (FUZ_rand(seed) % 15) : (FUZ_rand(seed) % 510) + 15)

◆ GB

#define GB   *(1U<<30)

◆ KB

#define KB   *(1U<<10)

◆ LZ4_DISABLE_DEPRECATE_WARNINGS

#define LZ4_DISABLE_DEPRECATE_WARNINGS   /* LZ4_decompress_fast */

◆ LZ4_HC_STATIC_LINKING_ONLY

#define LZ4_HC_STATIC_LINKING_ONLY

◆ LZ4_STATIC_LINKING_ONLY

#define LZ4_STATIC_LINKING_ONLY

◆ MAX_NB_BUFF_I134

#define MAX_NB_BUFF_I134   150

◆ MB

#define MB   *(1U<<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

◆ NB_ATTEMPTS

#define NB_ATTEMPTS   (1<<16)

◆ PRIME1

#define PRIME1   2654435761U

◆ PRIME2

#define PRIME2   2246822519U

◆ PRIME3

#define PRIME3   3266489917U

◆ ringBufferSize

#define ringBufferSize   (8 KB)

◆ testCompressedSize

#define testCompressedSize   (130 KB)

◆ testInputSize

#define testInputSize   (196 KB)

◆ XXH_STATIC_LINKING_ONLY

#define XXH_STATIC_LINKING_ONLY

Typedef Documentation

◆ uintptr_t

typedef size_t uintptr_t

Function Documentation

◆ main()

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