Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\decompress.c Create Date:2022-07-28 07:07:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:! ZSTD_decompressFrame() :*@dctx must be properly initialized

Proto:static size_t ZSTD_decompressFrame(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void **srcPtr, size_t *srcSizePtr)

Type:size_t

Parameter:

TypeParameterName
ZSTD_DCtx *dctx
void *dst
size_tdstCapacity
const void **srcPtr
size_t *srcSizePtr
1568  ip = srcPtr
1569  ostart = dst
1570  oend = ostart + dstCapacity
1571  op = ostart
1572  remainingSize = srcSizePtr
1575  If remainingSize < ZSTD_frameHeaderSize_min + ZSTD_blockHeaderSize Then Return -***************************************** Error codes handling(srcSize_wrong)
1580  frameHeaderSize = : size of the Frame Header
1581  If ZSTD_isError() - tells if a size_t function result is an error code*@code: The function result to check for error.* Return: Non-zero iff the code is an error. Then Return frameHeaderSize
1583  If remainingSize < frameHeaderSize + ZSTD_blockHeaderSize Then Return -***************************************** Error codes handling(srcSize_wrong)
1586  ip += frameHeaderSize
1587  remainingSize -= frameHeaderSize
1591  When 1 cycle
1594  cBlockSize = ! ZSTD_getcBlockSize() :* Provides the size of compressed block from block header `src`
1595  If ZSTD_isError() - tells if a size_t function result is an error code*@code: The function result to check for error.* Return: Non-zero iff the code is an error. Then Return cBlockSize
1598  ip += ZSTD_blockHeaderSize
1599  remainingSize -= ZSTD_blockHeaderSize
1600  If cBlockSize > remainingSize Then Return -***************************************** Error codes handling(srcSize_wrong)
1604  Case blockType == bt_compressed
1604  Break
1605  Case blockType == bt_raw
1605  Break
1606  Case blockType == bt_rle
1606  Break
1607  Case blockType == bt_reserved
1608  Default
1611  If ZSTD_isError() - tells if a size_t function result is an error code*@code: The function result to check for error.* Return: Non-zero iff the code is an error. Then Return decodedSize
1613  If checksumFlag Then xxh64_update( & xxhState, op, decodedSize)
1615  op += decodedSize
1616  ip += cBlockSize
1617  remainingSize -= cBlockSize
1618  If lastBlock Then Break
1622  If checksumFlag Then
1623  checkCalc = xxh64_digest( & xxhState)
1625  If remainingSize < 4 Then Return -***************************************** Error codes handling(checksum_wrong)
1627  checkRead = ZSTD_readLE32(ip)
1628  If checkRead != checkCalc Then Return -***************************************** Error codes handling(checksum_wrong)
1630  ip += 4
1631  remainingSize -= 4
1635  srcPtr = ip
1636  srcSizePtr = remainingSize
1637  Return op - ostart
Caller
NameDescribe
ZSTD_decompressMultiFrame