check_not_present_in_file STATIC_ASSERT ${LIB}mem.h
check_not_present_in_file "#define ZSTD_STATIC_ASSERT" ${LIB}compress.c
check_not_present MEM_STATIC
+ check_not_present FSE_COMMONDEFS_ONLY
check_not_present "#if 0"
check_not_present "#if 1"
check_not_present _MSC_VER
U32 const windowSize = 1U << params.cParams.windowLog;
U32 const singleSegment = params.fParams.contentSizeFlag && (windowSize >= pledgedSrcSize);
BYTE const windowLogByte = (BYTE)((params.cParams.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN) << 3);
- U32 const fcsCode = params.fParams.contentSizeFlag ? (pledgedSrcSize >= 256) + (pledgedSrcSize >= 65536 + 256) + (pledgedSrcSize >= 0xFFFFFFFFU)
- : /* 0-3 */
- 0;
+ U32 const fcsCode =
+ params.fParams.contentSizeFlag ? (pledgedSrcSize >= 256) + (pledgedSrcSize >= 65536 + 256) + (pledgedSrcSize >= 0xFFFFFFFFU) : 0; /* 0-3 */
BYTE const frameHeaderDecriptionByte = (BYTE)(dictIDSizeCode + (checksumFlag << 2) + (singleSegment << 5) + (fcsCode << 6));
size_t pos;
ip += toLoad;
break;
}
- }
/* check for single-pass mode opportunity */
if (zds->fParams.frameContentSize && zds->fParams.windowSize /* skippable frame if == 0 */
}
}
zds->stage = zdss_read;
+ }
/* pass-through */
case zdss_read: {
ZSTD_STATIC unsigned FSE_endOfDState(const FSE_DState_t *DStatePtr) { return DStatePtr->state == 0; }
-#ifndef FSE_COMMONDEFS_ONLY
-
/* **************************************************************
* Tuning parameters
****************************************************************/
#define FSE_FUNCTION_EXTENSION
#define FSE_DECODE_TYPE FSE_decode_t
-#endif /* !FSE_COMMONDEFS_ONLY */
-
/* ***************************************************************
* Constants
*****************************************************************/
return 0;
}
-#ifndef FSE_COMMONDEFS_ONLY
-
/*-**************************************************************
* FSE NCount encoding-decoding
****************************************************************/
return op - ostart;
}
-
-#endif /* FSE_COMMONDEFS_ONLY */
return 0;
}
-#ifndef FSE_COMMONDEFS_ONLY
-
/*-*******************************************************
* Decompression (Byte symbols)
*********************************************************/
return FSE_decompress_usingDTable(dst, dstCapacity, ip, cSrcSize, workSpace); /* always return, even if it is an error code */
}
-
-#endif /* FSE_COMMONDEFS_ONLY */
}
}
/* only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !) */
- while (
- (nBitsToDecrease <= HUF_TABLELOG_MAX) &&
- (rankLast[nBitsToDecrease] == noSymbol)) /* HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary */
+ /* HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary */
+ while ((nBitsToDecrease <= HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol))
nBitsToDecrease++;
totalCost -= 1 << (nBitsToDecrease - 1);
if (rankLast[nBitsToDecrease - 1] == noSymbol)
if (DStream->bitsConsumed < (sizeof(DStream->bitContainer) * 8)) {
BIT_skipBits(DStream, dt[val].nbBits);
if (DStream->bitsConsumed > (sizeof(DStream->bitContainer) * 8))
- DStream->bitsConsumed =
- (sizeof(DStream->bitContainer) *
- 8); /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */
+ /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */
+ DStream->bitsConsumed = (sizeof(DStream->bitContainer) * 8);
}
}
return 1;