13 #define LZ4_STATIC_LINKING_ONLY
15 #define LZ4_HC_STATIC_LINKING_ONLY
64 state.data.buf = (
char const*)data;
98 state->compressed.pos = 0;
99 state->roundTrip.pos = 0;
106 int const dstCapacity =
state->roundTrip.size -
state->roundTrip.pos;
110 state->roundTrip.pos += dSize;
115 char const* data =
state->data.buf;
130 DEBUGLOG(2,
"dictSize = %zu", dictSize);
134 state->data.pos += dictSize;
135 state->roundTrip.pos += dictSize;
144 int const srcRemaining =
state->data.size -
state->data.pos;
146 int const dstCapacity =
state->compressed.size -
state->compressed.pos;
151 state->compressed.pos += cSize;
162 char const* data = (
i++ & 1) ?
state->data.buf : data2.
buf;
163 char const*
src = data +
state->data.pos;
165 int const srcRemaining =
state->data.size -
state->data.pos;
167 int const dstCapacity =
state->compressed.size -
state->compressed.pos;
172 state->compressed.pos += cSize;
190 char const* dict =
state->data.buf;
199 char const* dict =
state->data.buf;
214 int const srcRemaining =
state->data.size -
state->data.pos;
216 int const dstCapacity =
state->compressed.size -
state->compressed.pos;
221 state->compressed.pos += cSize;
233 char const* data = (
i++ & 1) ?
state->data.buf : data2.
buf;
234 char const*
src = data +
state->data.pos;
236 int const srcRemaining =
state->data.size -
state->data.pos;
238 int const dstCapacity =
state->compressed.size -
state->compressed.pos;
244 state->compressed.pos += cSize;
252 char const* dict =
state->data.buf;
262 char const* dict =
state->data.buf;
292 for (
i = 0;
i <
n; ++
i) {
FUZZ_STATIC uint32_t FUZZ_seed(uint8_t const **src, size_t *size)
#define FUZZ_ASSERT(cond)
FUZZ_STATIC uint32_t FUZZ_rand32(uint32_t *state, uint32_t min, uint32_t max)
#define FUZZ_ASSERT_MSG(cond, msg)
RZ_API void Ht_() free(HtName_(Ht) *ht)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
int LZ4_compressBound(int isize)
int LZ4_loadDict(LZ4_stream_t *LZ4_dict, const char *dictionary, int dictSize)
LZ4_stream_t * LZ4_createStream(void)
LZ4_streamDecode_t * LZ4_createStreamDecode(void)
void LZ4_resetStream_fast(LZ4_stream_t *ctx)
int LZ4_freeStream(LZ4_stream_t *LZ4_stream)
int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
LZ4_FORCE_O2 int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int compressedSize, int maxOutputSize)
int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
void LZ4_attach_dictionary(LZ4_stream_t *workingStream, const LZ4_stream_t *dictionaryStream)
int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
void LZ4_attach_HC_dictionary(LZ4_streamHC_t *working_stream, const LZ4_streamHC_t *dictionary_stream)
void LZ4_resetStreamHC_fast(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
int LZ4_freeStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr)
int LZ4_compress_HC_continue(LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int srcSize, int dstCapacity)
LZ4_streamHC_t * LZ4_createStreamHC(void)
void LZ4_setCompressionLevel(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr, const char *dictionary, int dictSize)
static void state_attachDictRoundTrip(state_t *state)
static size_t state_trimDict(state_t *state)
static void state_loadDictRoundTrip(state_t *state)
static void state_randomRoundTrip(state_t *state, round_trip_t rt0, round_trip_t rt1)
state_t state_create(char const *data, size_t size, uint32_t seed)
static void state_extDictRoundTrip(state_t *state)
cursor_t cursor_create(size_t size)
static void state_decompress(state_t *state, char const *src, int srcSize)
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
static void state_reset(state_t *state, uint32_t seed)
static void state_loadDictHCRoundTrip(state_t *state)
static void state_extDictHCRoundTrip(state_t *state)
void state_free(state_t state)
static void state_prefixRoundTrip(state_t *state)
void cursor_free(cursor_t cursor)
void(* round_trip_t)(state_t *state)
static void state_checkRoundTrip(state_t const *state)
static void state_prefixHCRoundTrip(state_t *state)
round_trip_t roundTrips[]
static void state_attachDictHCRoundTrip(state_t *state)
LZ4_streamDecode_t * dstream
LZ4_streamHC_t * cstreamHC