#include <linux/lz4.h>
#include "lz4defs.h"
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#define OPTIMAL_ML …
#define HASH_FUNCTION(i) …
#define DELTANEXTU16(p) …
static U32 LZ4HC_hashPtr(const void *ptr)
{ … }
static void LZ4HC_init(LZ4HC_CCtx_internal *hc4, const BYTE *start)
{ … }
static FORCE_INLINE void LZ4HC_Insert(LZ4HC_CCtx_internal *hc4,
const BYTE *ip)
{ … }
static FORCE_INLINE int LZ4HC_InsertAndFindBestMatch(
LZ4HC_CCtx_internal *hc4,
const BYTE *ip,
const BYTE * const iLimit,
const BYTE **matchpos,
const int maxNbAttempts)
{ … }
static FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch(
LZ4HC_CCtx_internal *hc4,
const BYTE * const ip,
const BYTE * const iLowLimit,
const BYTE * const iHighLimit,
int longest,
const BYTE **matchpos,
const BYTE **startpos,
const int maxNbAttempts)
{ … }
static FORCE_INLINE int LZ4HC_encodeSequence(
const BYTE **ip,
BYTE **op,
const BYTE **anchor,
int matchLength,
const BYTE * const match,
limitedOutput_directive limitedOutputBuffer,
BYTE *oend)
{ … }
static int LZ4HC_compress_generic(
LZ4HC_CCtx_internal *const ctx,
const char * const source,
char * const dest,
int const inputSize,
int const maxOutputSize,
int compressionLevel,
limitedOutput_directive limit
)
{ … }
static int LZ4_compress_HC_extStateHC(
void *state,
const char *src,
char *dst,
int srcSize,
int maxDstSize,
int compressionLevel)
{ … }
int LZ4_compress_HC(const char *src, char *dst, int srcSize,
int maxDstSize, int compressionLevel, void *wrkmem)
{ … }
EXPORT_SYMBOL(…);
void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
{ … }
int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr,
const char *dictionary,
int dictSize)
{ … }
EXPORT_SYMBOL(…);
static void LZ4HC_setExternalDict(
LZ4HC_CCtx_internal *ctxPtr,
const BYTE *newBlock)
{ … }
static int LZ4_compressHC_continue_generic(
LZ4_streamHC_t *LZ4_streamHCPtr,
const char *source,
char *dest,
int inputSize,
int maxOutputSize,
limitedOutput_directive limit)
{ … }
int LZ4_compress_HC_continue(
LZ4_streamHC_t *LZ4_streamHCPtr,
const char *source,
char *dest,
int inputSize,
int maxOutputSize)
{ … }
EXPORT_SYMBOL(…);
int LZ4_saveDictHC(
LZ4_streamHC_t *LZ4_streamHCPtr,
char *safeBuffer,
int dictSize)
{ … }
EXPORT_SYMBOL(…);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;