Lines Matching refs:size_t
87 static size_t ZSTD_DDictHashSet_getIndex(const ZSTD_DDictHashSet* hashSet, U32 dictID) { in ZSTD_DDictHashSet_getIndex()
97 static size_t ZSTD_DDictHashSet_emplaceDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict) { in ZSTD_DDictHashSet_emplaceDDict()
99 size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); in ZSTD_DDictHashSet_emplaceDDict()
100 const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; in ZSTD_DDictHashSet_emplaceDDict()
123 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand()
124 size_t newTableSize = hashSet->ddictPtrTableSize * DDICT_HASHSET_RESIZE_FACTOR; in ZSTD_DDictHashSet_expand()
127 size_t oldTableSize = hashSet->ddictPtrTableSize; in ZSTD_DDictHashSet_expand()
128 size_t i; in ZSTD_DDictHashSet_expand()
149 size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); in ZSTD_DDictHashSet_getDDict()
150 const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; in ZSTD_DDictHashSet_getDDict()
153 size_t currDictID = ZSTD_getDictID_fromDDict(hashSet->ddictPtrTable[idx]); in ZSTD_DDictHashSet_getDDict()
201 static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict, ZSTD_… in ZSTD_DDictHashSet_addDDict()
213 size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx) in ZSTD_sizeof_DCtx()
221 size_t ZSTD_estimateDCtxSize(void) { return sizeof(ZSTD_DCtx); } in ZSTD_estimateDCtxSize()
224 static size_t ZSTD_startingInputLength(ZSTD_format_e format) in ZSTD_startingInputLength()
226 size_t const startingInputLength = ZSTD_FRAMEHEADERSIZE_PREFIX(format); in ZSTD_startingInputLength()
266 ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize) in ZSTD_initStaticDCtx()
270 if ((size_t)workspace & 7) return NULL; /* 8-aligned */ in ZSTD_initStaticDCtx()
309 size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx) in ZSTD_freeDCtx()
329 size_t const toCopy = (size_t)((char*)(&dstDCtx->inBuff) - (char*)dstDCtx); in ZSTD_copyDCtx()
366 unsigned ZSTD_isFrame(const void* buffer, size_t size) in ZSTD_isFrame()
380 unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size) in ZSTD_isSkippableFrame()
394 static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) in ZSTD_frameHeaderSize_internal()
396 size_t const minInputSize = ZSTD_startingInputLength(format); in ZSTD_frameHeaderSize_internal()
413 size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) in ZSTD_frameHeaderSize()
425 size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD… in ZSTD_getFrameHeader_advanced()
428 size_t const minInputSize = ZSTD_startingInputLength(format); in ZSTD_getFrameHeader_advanced()
449 { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); in ZSTD_getFrameHeader_advanced()
455 size_t pos = minInputSize; in ZSTD_getFrameHeader_advanced()
511 size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize) in ZSTD_getFrameHeader()
521 unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize) in ZSTD_getFrameContentSize()
533 static size_t readSkippableFrameSize(void const* src, size_t srcSize) in readSkippableFrameSize()
535 size_t const skippableHeaderSize = ZSTD_SKIPPABLEHEADERSIZE; in readSkippableFrameSize()
544 size_t const skippableSize = skippableHeaderSize + sizeU32; in readSkippableFrameSize()
561 ZSTDLIB_API size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, unsigned* magicVariant, in ZSTD_readSkippableFrame()
562 const void* src, size_t srcSize) in ZSTD_readSkippableFrame()
565 size_t skippableFrameSize = readSkippableFrameSize(src, srcSize); in ZSTD_readSkippableFrame()
566 size_t skippableContentSize = skippableFrameSize - ZSTD_SKIPPABLEHEADERSIZE; in ZSTD_readSkippableFrame()
586 unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize) in ZSTD_findDecompressedSize()
594 size_t const skippableSize = readSkippableFrameSize(src, srcSize); in ZSTD_findDecompressedSize()
612 { size_t const frameSrcSize = ZSTD_findFrameCompressedSize(src, srcSize); in ZSTD_findDecompressedSize()
635 unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize) in ZSTD_getDecompressedSize()
647 static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t headerSize) in ZSTD_decodeFrameHeader()
649 …size_t const result = ZSTD_getFrameHeader_advanced(&(dctx->fParams), src, headerSize, dctx->format… in ZSTD_decodeFrameHeader()
671 static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret) in ZSTD_errorFrameSizeInfo()
679 static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t srcSize) in ZSTD_findFrameSizeInfo()
694 size_t remainingSize = srcSize; in ZSTD_findFrameSizeInfo()
695 size_t nbBlocks = 0; in ZSTD_findFrameSizeInfo()
699 { size_t const ret = ZSTD_getFrameHeader(&zfh, src, srcSize); in ZSTD_findFrameSizeInfo()
712 size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSize, &blockProperties); in ZSTD_findFrameSizeInfo()
733 frameSizeInfo.compressedSize = (size_t)(ip - ipstart); in ZSTD_findFrameSizeInfo()
746 size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize) in ZSTD_findFrameCompressedSize()
758 unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize) in ZSTD_decompressBound()
764 size_t const compressedSize = frameSizeInfo.compressedSize; in ZSTD_decompressBound()
783 size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize) in ZSTD_insertBlock()
792 static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity, in ZSTD_copyRawBlock()
793 const void* src, size_t srcSize) in ZSTD_copyRawBlock()
805 static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, in ZSTD_setRleBlock()
807 size_t regenSize) in ZSTD_setRleBlock()
831 static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, in ZSTD_decompressFrame()
832 void* dst, size_t dstCapacity, in ZSTD_decompressFrame()
833 const void** srcPtr, size_t *srcSizePtr) in ZSTD_decompressFrame()
840 size_t remainingSrcSize = *srcSizePtr; in ZSTD_decompressFrame()
850 { size_t const frameHeaderSize = ZSTD_frameHeaderSize_internal( in ZSTD_decompressFrame()
862 size_t decodedSize; in ZSTD_decompressFrame()
864 size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSrcSize, &blockProperties); in ZSTD_decompressFrame()
891 …decodedSize = ZSTD_decompressBlock_internal(dctx, op, (size_t)(oBlockEnd-op), ip, cBlockSize, /* f… in ZSTD_decompressFrame()
895 decodedSize = ZSTD_copyRawBlock(op, (size_t)(oend-op), ip, cBlockSize); in ZSTD_decompressFrame()
898 … decodedSize = ZSTD_setRleBlock(op, (size_t)(oBlockEnd-op), *ip, blockProperties.origSize); in ZSTD_decompressFrame()
935 return (size_t)(op-ostart); in ZSTD_decompressFrame()
938 static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, in ZSTD_decompressMultiFrame()
939 void* dst, size_t dstCapacity, in ZSTD_decompressMultiFrame()
940 const void* src, size_t srcSize, in ZSTD_decompressMultiFrame()
941 const void* dict, size_t dictSize, in ZSTD_decompressMultiFrame()
962 size_t const skippableSize = readSkippableFrameSize(src, srcSize); in ZSTD_decompressMultiFrame()
981 { const size_t res = ZSTD_decompressFrame(dctx, dst, dstCapacity, in ZSTD_decompressMultiFrame()
1005 return (size_t)((BYTE*)dst - (BYTE*)dststart); in ZSTD_decompressMultiFrame()
1008 size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx, in ZSTD_decompress_usingDict()
1009 void* dst, size_t dstCapacity, in ZSTD_decompress_usingDict()
1010 const void* src, size_t srcSize, in ZSTD_decompress_usingDict()
1011 const void* dict, size_t dictSize) in ZSTD_decompress_usingDict()
1034 size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t … in ZSTD_decompressDCtx()
1040 size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_decompress()
1043 size_t regenSize; in ZSTD_decompress()
1061 size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; } in ZSTD_nextSrcSizeToDecompress()
1073 static size_t ZSTD_nextSrcSizeToDecompressWithInputSize(ZSTD_DCtx* dctx, size_t inputSize) { in ZSTD_nextSrcSizeToDecompressWithInputSize()
1112 size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, siz… in ZSTD_decompressContinue()
1150 size_t const cBlockSize = ZSTD_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); in ZSTD_decompressContinue()
1179 { size_t rSize; in ZSTD_decompressContinue()
1270 static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) in ZSTD_refDictContent()
1286 size_t
1288 const void* const dict, size_t const dictSize) in ZSTD_loadDEntropy()
1301 …size_t const workspaceSize = sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy-… in ZSTD_loadDEntropy()
1304 size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, in ZSTD_loadDEntropy()
1308 size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, in ZSTD_loadDEntropy()
1309 dictPtr, (size_t)(dictEnd - dictPtr), in ZSTD_loadDEntropy()
1318 …size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dict… in ZSTD_loadDEntropy()
1333 …size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matc… in ZSTD_loadDEntropy()
1348 …size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthL… in ZSTD_loadDEntropy()
1363 size_t const dictContentSize = (size_t)(dictEnd - (dictPtr+12)); in ZSTD_loadDEntropy()
1371 return (size_t)(dictPtr - (const BYTE*)dict); in ZSTD_loadDEntropy()
1374 static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) in ZSTD_decompress_insertDictionary()
1384 { size_t const eSize = ZSTD_loadDEntropy(&dctx->entropy, dict, dictSize); in ZSTD_decompress_insertDictionary()
1395 size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx) in ZSTD_decompressBegin()
1419 size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) in ZSTD_decompressBegin_usingDict()
1432 size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) in ZSTD_decompressBegin_usingDDict()
1438 size_t const dictSize = ZSTD_DDict_dictSize(ddict); in ZSTD_decompressBegin_usingDDict()
1455 unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize) in ZSTD_getDictID_fromDict()
1475 unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize) in ZSTD_getDictID_fromFrame()
1478 size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize); in ZSTD_getDictID_fromFrame()
1487 size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx, in ZSTD_decompress_usingDDict()
1488 void* dst, size_t dstCapacity, in ZSTD_decompress_usingDDict()
1489 const void* src, size_t srcSize, in ZSTD_decompress_usingDDict()
1509 ZSTD_DStream* ZSTD_initStaticDStream(void *workspace, size_t workspaceSize) in ZSTD_initStaticDStream()
1519 size_t ZSTD_freeDStream(ZSTD_DStream* zds) in ZSTD_freeDStream()
1527 size_t ZSTD_DStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX + ZSTD_blockHeaderSize; } in ZSTD_DStreamInSize()
1528 size_t ZSTD_DStreamOutSize(void) { return ZSTD_BLOCKSIZE_MAX; } in ZSTD_DStreamOutSize()
1530 size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, in ZSTD_DCtx_loadDictionary_advanced()
1531 const void* dict, size_t dictSize, in ZSTD_DCtx_loadDictionary_advanced()
1546 size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) in ZSTD_DCtx_loadDictionary_byReference()
1551 size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) in ZSTD_DCtx_loadDictionary()
1556 size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_di… in ZSTD_DCtx_refPrefix_advanced()
1563 size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize) in ZSTD_DCtx_refPrefix()
1572 size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize) in ZSTD_initDStream_usingDict()
1581 size_t ZSTD_initDStream(ZSTD_DStream* zds) in ZSTD_initDStream()
1590 size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict) in ZSTD_initDStream_usingDDict()
1600 size_t ZSTD_resetDStream(ZSTD_DStream* dctx) in ZSTD_resetDStream()
1607 size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) in ZSTD_DCtx_refDDict()
1631 size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize) in ZSTD_DCtx_setMaxWindowSize()
1634 size_t const min = (size_t)1 << bounds.lowerBound; in ZSTD_DCtx_setMaxWindowSize()
1635 size_t const max = (size_t)1 << bounds.upperBound; in ZSTD_DCtx_setMaxWindowSize()
1643 size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format) in ZSTD_DCtx_setFormat()
1695 size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int* value) in ZSTD_DCtx_getParameter()
1718 size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value) in ZSTD_DCtx_setParameter()
1725 dctx->maxWindowSize = ((size_t)1) << value; in ZSTD_DCtx_setParameter()
1751 size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset) in ZSTD_DCtx_reset()
1768 size_t ZSTD_sizeof_DStream(const ZSTD_DStream* dctx) in ZSTD_sizeof_DStream()
1773 size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSi… in ZSTD_decodingBufferSize_min()
1775 size_t const blockSize = (size_t) MIN(windowSize, ZSTD_BLOCKSIZE_MAX); in ZSTD_decodingBufferSize_min()
1779 size_t const minRBSize = (size_t) neededSize; in ZSTD_decodingBufferSize_min()
1785 size_t ZSTD_estimateDStreamSize(size_t windowSize) in ZSTD_estimateDStreamSize()
1787 size_t const blockSize = MIN(windowSize, ZSTD_BLOCKSIZE_MAX); in ZSTD_estimateDStreamSize()
1788 size_t const inBuffSize = blockSize; /* no block can be larger */ in ZSTD_estimateDStreamSize()
1789 size_t const outBuffSize = ZSTD_decodingBufferSize_min(windowSize, ZSTD_CONTENTSIZE_UNKNOWN); in ZSTD_estimateDStreamSize()
1793 size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize) in ZSTD_estimateDStreamSize_fromFrame()
1797 size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize); in ZSTD_estimateDStreamSize_fromFrame()
1802 return ZSTD_estimateDStreamSize((size_t)zfh.windowSize); in ZSTD_estimateDStreamSize_fromFrame()
1808 static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const need… in ZSTD_DCtx_isOverflow()
1813 …void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t co… in ZSTD_DCtx_updateOversizedDuration()
1827 static size_t ZSTD_checkOutBuffer(ZSTD_DStream const* zds, ZSTD_outBuffer const* output) in ZSTD_checkOutBuffer()
1849 static size_t ZSTD_decompressContinueStream( in ZSTD_decompressContinueStream()
1851 void const* src, size_t srcSize) { in ZSTD_decompressContinueStream()
1854 size_t const dstSize = isSkipFrame ? 0 : zds->outBuffSize - zds->outStart; in ZSTD_decompressContinueStream()
1855 size_t const decodedSize = ZSTD_decompressContinue(zds, in ZSTD_decompressContinueStream()
1866 size_t const dstSize = isSkipFrame ? 0 : (size_t)(oend - *op); in ZSTD_decompressContinueStream()
1867 size_t const decodedSize = ZSTD_decompressContinue(zds, *op, dstSize, src, srcSize); in ZSTD_decompressContinueStream()
1878 size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input) in ZSTD_decompressStream()
1917 …{ size_t const hSize = ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSiz… in ZSTD_decompressStream()
1926 … size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */ in ZSTD_decompressStream()
1927 size_t const remainingInput = (size_t)(iend-ip); in ZSTD_decompressStream()
1935 …return (MAX((size_t)ZSTD_FRAMEHEADERSIZE_MIN(zds->format), hSize) - zds->lhSize) + ZSTD_blockHeade… in ZSTD_decompressStream()
1945 && (U64)(size_t)(oend-op) >= zds->fParams.frameContentSize) { in ZSTD_decompressStream()
1946 size_t const cSize = ZSTD_findFrameCompressedSize(istart, (size_t)(iend-istart)); in ZSTD_decompressStream()
1947 if (cSize <= (size_t)(iend-istart)) { in ZSTD_decompressStream()
1949 …size_t const decompressedSize = ZSTD_decompress_usingDDict(zds, op, (size_t)(oend-op), istart, cSi… in ZSTD_decompressStream()
1964 && (U64)(size_t)(oend-op) < zds->fParams.frameContentSize) { in ZSTD_decompressStream()
1990 … { size_t const neededInBuffSize = MAX(zds->fParams.blockSizeMax, 4 /* frame checksum */); in ZSTD_decompressStream()
1991 size_t const neededOutBuffSize = zds->outBufferMode == ZSTD_bm_buffered in ZSTD_decompressStream()
2001 size_t const bufferSize = neededInBuffSize + neededOutBuffSize; in ZSTD_decompressStream()
2028 …{ size_t const neededInSize = ZSTD_nextSrcSizeToDecompressWithInputSize(zds, (size_t)(iend - ip)… in ZSTD_decompressStream()
2035 if ((size_t)(iend-ip) >= neededInSize) { /* decode directly from src */ in ZSTD_decompressStream()
2046 { size_t const neededInSize = ZSTD_nextSrcSizeToDecompress(zds); in ZSTD_decompressStream()
2047 size_t const toLoad = neededInSize - zds->inPos; in ZSTD_decompressStream()
2049 size_t loadedSize; in ZSTD_decompressStream()
2053 loadedSize = MIN(toLoad, (size_t)(iend-ip)); in ZSTD_decompressStream()
2058 … loadedSize = ZSTD_limitCopy(zds->inBuff + zds->inPos, toLoad, ip, (size_t)(iend-ip)); in ZSTD_decompressStream()
2071 { size_t const toFlushSize = zds->outEnd - zds->outStart; in ZSTD_decompressStream()
2072 …size_t const flushedSize = ZSTD_limitCopy(op, (size_t)(oend-op), zds->outBuff + zds->outStart, toF… in ZSTD_decompressStream()
2096 input->pos = (size_t)(ip - (const char*)(input->src)); in ZSTD_decompressStream()
2097 output->pos = (size_t)(op - (char*)(output->dst)); in ZSTD_decompressStream()
2112 { size_t nextSrcSizeHint = ZSTD_nextSrcSizeToDecompress(zds); in ZSTD_decompressStream()
2138 size_t ZSTD_decompressStream_simpleArgs ( in ZSTD_decompressStream_simpleArgs()
2140 void* dst, size_t dstCapacity, size_t* dstPos, in ZSTD_decompressStream_simpleArgs()
2141 const void* src, size_t srcSize, size_t* srcPos) in ZSTD_decompressStream_simpleArgs()
2146 size_t const cErr = ZSTD_decompressStream(dctx, &output, &input); in ZSTD_decompressStream_simpleArgs()