lz4: remove unused functions
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
This commit is contained in:
parent
73dec0bdf8
commit
42b584cb4c
@ -133,6 +133,7 @@ typedef union {
|
||||
LZ4HC_CCtx_internal internal_donotuse;
|
||||
} LZ4_streamHC_t;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* LZ4_streamDecode_t - information structure to track an
|
||||
* LZ4 stream during decompression.
|
||||
@ -149,6 +150,7 @@ typedef union {
|
||||
unsigned long long table[LZ4_STREAMDECODESIZE_U64];
|
||||
LZ4_streamDecode_t_internal internal_donotuse;
|
||||
} LZ4_streamDecode_t;
|
||||
#endif
|
||||
|
||||
/*-************************************************************************
|
||||
* SIZE OF STATE
|
||||
@ -197,6 +199,7 @@ static inline int LZ4_compressBound(size_t isize)
|
||||
int LZ4_compress_default(const char *source, char *dest, int inputSize,
|
||||
int maxOutputSize, void *wrkmem);
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* LZ4_compress_fast() - As LZ4_compress_default providing an acceleration param
|
||||
* @source: source address of the original data
|
||||
@ -244,6 +247,7 @@ static int LZ4_compress_fast(const char *source, char *dest, int inputSize,
|
||||
*/
|
||||
static int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr,
|
||||
int targetDestSize, void *wrkmem);
|
||||
#endif
|
||||
|
||||
/*-************************************************************************
|
||||
* Decompression Functions
|
||||
@ -292,6 +296,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize);
|
||||
int LZ4_decompress_safe(const char *source, char *dest, int compressedSize,
|
||||
int maxDecompressedSize);
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* LZ4_decompress_safe_partial() - Decompress a block of size 'compressedSize'
|
||||
* at position 'source' into buffer 'dest'
|
||||
@ -319,6 +324,7 @@ int LZ4_decompress_safe(const char *source, char *dest, int compressedSize,
|
||||
*/
|
||||
static int LZ4_decompress_safe_partial(const char *source, char *dest,
|
||||
int compressedSize, int targetOutputSize, int maxDecompressedSize);
|
||||
#endif
|
||||
|
||||
/*-************************************************************************
|
||||
* LZ4 HC Compression
|
||||
@ -346,6 +352,7 @@ static int LZ4_decompress_safe_partial(const char *source, char *dest,
|
||||
int LZ4_compress_HC(const char *src, char *dst, int srcSize, int dstCapacity,
|
||||
int compressionLevel, void *wrkmem);
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* LZ4_resetStreamHC() - Init an allocated 'LZ4_streamHC_t' structure
|
||||
* @streamHCPtr: pointer to the 'LZ4_streamHC_t' structure
|
||||
@ -644,5 +651,6 @@ static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
|
||||
*/
|
||||
static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
|
||||
int originalSize, const char *dictStart, int dictSize);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -189,9 +189,6 @@ static FORCE_INLINE int LZ4_compress_generic(
|
||||
const BYTE *base;
|
||||
const BYTE *lowLimit;
|
||||
const BYTE * const lowRefLimit = ip - dictPtr->dictSize;
|
||||
const BYTE * const dictionary = dictPtr->dictionary;
|
||||
const BYTE * const dictEnd = dictionary + dictPtr->dictSize;
|
||||
const size_t dictDelta = dictEnd - (const BYTE *)source;
|
||||
const BYTE *anchor = (const BYTE *) source;
|
||||
const BYTE * const iend = ip + inputSize;
|
||||
const BYTE * const mflimit = iend - MFLIMIT;
|
||||
@ -219,10 +216,6 @@ static FORCE_INLINE int LZ4_compress_generic(
|
||||
base = (const BYTE *)source - dictPtr->currentOffset;
|
||||
lowLimit = (const BYTE *)source - dictPtr->dictSize;
|
||||
break;
|
||||
case usingExtDict:
|
||||
base = (const BYTE *)source - dictPtr->currentOffset;
|
||||
lowLimit = (const BYTE *)source;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((tableType == byU16)
|
||||
@ -266,15 +259,6 @@ static FORCE_INLINE int LZ4_compress_generic(
|
||||
dictPtr->hashTable,
|
||||
tableType, base);
|
||||
|
||||
if (dict == usingExtDict) {
|
||||
if (match < (const BYTE *)source) {
|
||||
refDelta = dictDelta;
|
||||
lowLimit = dictionary;
|
||||
} else {
|
||||
refDelta = 0;
|
||||
lowLimit = (const BYTE *)source;
|
||||
} }
|
||||
|
||||
forwardH = LZ4_hashPosition(forwardIp,
|
||||
tableType);
|
||||
|
||||
@ -335,34 +319,9 @@ _next_match:
|
||||
{
|
||||
unsigned int matchCode;
|
||||
|
||||
if ((dict == usingExtDict)
|
||||
&& (lowLimit == dictionary)) {
|
||||
const BYTE *limit;
|
||||
|
||||
match += refDelta;
|
||||
limit = ip + (dictEnd - match);
|
||||
|
||||
if (limit > matchlimit)
|
||||
limit = matchlimit;
|
||||
|
||||
matchCode = LZ4_count(ip + MINMATCH,
|
||||
match + MINMATCH, limit);
|
||||
|
||||
ip += MINMATCH + matchCode;
|
||||
|
||||
if (ip == limit) {
|
||||
unsigned const int more = LZ4_count(ip,
|
||||
(const BYTE *)source,
|
||||
matchlimit);
|
||||
|
||||
matchCode += more;
|
||||
ip += more;
|
||||
}
|
||||
} else {
|
||||
matchCode = LZ4_count(ip + MINMATCH,
|
||||
match + MINMATCH, matchlimit);
|
||||
ip += MINMATCH + matchCode;
|
||||
}
|
||||
|
||||
if (outputLimited &&
|
||||
/* Check output buffer overflow */
|
||||
@ -401,16 +360,6 @@ _next_match:
|
||||
match = LZ4_getPosition(ip, dictPtr->hashTable,
|
||||
tableType, base);
|
||||
|
||||
if (dict == usingExtDict) {
|
||||
if (match < (const BYTE *)source) {
|
||||
refDelta = dictDelta;
|
||||
lowLimit = dictionary;
|
||||
} else {
|
||||
refDelta = 0;
|
||||
lowLimit = (const BYTE *)source;
|
||||
}
|
||||
}
|
||||
|
||||
LZ4_putPosition(ip, dictPtr->hashTable, tableType, base);
|
||||
|
||||
if (((dictIssue == dictSmall) ? (match >= lowRefLimit) : 1)
|
||||
@ -470,7 +419,7 @@ static int LZ4_compress_fast_extState(
|
||||
const tableType_t tableType = byPtr;
|
||||
#endif
|
||||
|
||||
LZ4_resetStream((LZ4_stream_t *)state);
|
||||
memset(state, 0, sizeof(LZ4_stream_t));
|
||||
|
||||
if (acceleration < 1)
|
||||
acceleration = LZ4_ACCELERATION_DEFAULT;
|
||||
@ -515,6 +464,7 @@ int LZ4_compress_default(const char *source, char *dest, int inputSize,
|
||||
}
|
||||
EXPORT_SYMBOL(LZ4_compress_default);
|
||||
|
||||
#if 0
|
||||
/*-******************************
|
||||
* *_destSize() variant
|
||||
********************************/
|
||||
@ -932,6 +882,7 @@ static int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *sour
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_DESCRIPTION("LZ4 compressor");
|
||||
|
@ -160,7 +160,7 @@ static FORCE_INLINE int LZ4_decompress_generic(
|
||||
endCondition_directive endOnInput,
|
||||
/* full, partial */
|
||||
earlyEnd_directive partialDecoding,
|
||||
/* noDict, withPrefix64k, usingExtDict */
|
||||
/* noDict, withPrefix64k */
|
||||
dict_directive dict,
|
||||
/* always <= dst, == dst when no prefix */
|
||||
const BYTE * const lowPrefix,
|
||||
@ -177,7 +177,6 @@ static FORCE_INLINE int LZ4_decompress_generic(
|
||||
BYTE *const oend = op + outputSize;
|
||||
BYTE *cpy;
|
||||
|
||||
const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize;
|
||||
const int safeDecode = (endOnInput == endOnInputSize);
|
||||
const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB)));
|
||||
|
||||
@ -591,6 +590,7 @@ _copy_match:
|
||||
safe_match_copy:
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* match starting within external dictionary */
|
||||
if ((dict == usingExtDict) && (match < lowPrefix)) {
|
||||
if (unlikely(op + length > oend - LASTLITERALS)) {
|
||||
@ -632,6 +632,7 @@ safe_match_copy:
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* copy match within block */
|
||||
cpy = op + length;
|
||||
@ -724,6 +725,7 @@ int LZ4_decompress_safe(const char *source, char *dest,
|
||||
noDict, (BYTE *)dest, NULL, 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int LZ4_decompress_safe_partial(const char *src, char *dst,
|
||||
int compressedSize, int targetOutputSize, int dstCapacity)
|
||||
{
|
||||
@ -732,6 +734,7 @@ static int LZ4_decompress_safe_partial(const char *src, char *dst,
|
||||
endOnInputSize, partial_decode,
|
||||
noDict, (BYTE *)dst, NULL, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
|
||||
{
|
||||
@ -741,6 +744,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
|
||||
(BYTE *)dest - 64 * KB, NULL, 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* ===== Instantiate a few more decoding cases, used more than once. ===== */
|
||||
|
||||
int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
|
||||
@ -962,6 +966,7 @@ static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
|
||||
return LZ4_decompress_fast_extDict(source, dest, originalSize,
|
||||
dictStart, dictSize);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef STATIC
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
@ -292,7 +292,7 @@ static FORCE_INLINE unsigned read_variable_length(const BYTE **ip,
|
||||
typedef enum { noLimit = 0, limitedOutput = 1 } limitedOutput_directive;
|
||||
typedef enum { byPtr, byU32, byU16 } tableType_t;
|
||||
|
||||
typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive;
|
||||
typedef enum { noDict = 0, withPrefix64k } dict_directive;
|
||||
typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive;
|
||||
|
||||
typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive;
|
||||
|
Loading…
Reference in New Issue
Block a user