Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: : nb of bytes generated into `dst` (necessarily <= `dstCapacity)

Proto:size_t ZSTD_decompressContinue(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)

Type:size_t

Parameter:

TypeParameterName
ZSTD_DCtx *dctx
void *dst
size_tdstCapacity
const void *src
size_tsrcSize

Brief:ZSTD_decompressContinue() :* or an error code, which can be tested using ZSTD_isError()

1746  If srcSize != expected Then Return -***************************************** Error codes handling(srcSize_wrong)
1748  If dstCapacity Then ZSTD_checkContinuity(dctx, dst)
1752  Case stage == ZSTDds_getFrameHeaderSize
1753  If srcSize != ZSTD_frameHeaderSize_prefix Then Return -***************************************** Error codes handling(srcSize_wrong)
1755  If (ZSTD_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START Then
1759  Return 0
1761  headerSize = : size of the Frame Header
1762  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 headerSize
1764  No 3D Now!(headerBuffer, src, ZSTD_frameHeaderSize_prefix)
1768  Return 0
1770  expected = 0
1773  Case stage == ZSTDds_decodeFrameHeader
1774  No 3D Now!(headerBuffer + ZSTD_frameHeaderSize_prefix, src, expected)
1776  expected = ZSTD_blockHeaderSize
1777  stage = ZSTDds_decodeBlockHeader
1778  Return 0
1780  Case stage == ZSTDds_decodeBlockHeader
1782  cBlockSize = ! ZSTD_getcBlockSize() :* Provides the size of compressed block from block header `src`
1783  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
1785  expected = cBlockSize
1786  bType = blockType
1787  rleSize = origSize
1788  If cBlockSize Then
1790  Return 0
1793  If lastBlock Then
1794  If checksumFlag Then
1795  expected = 4
1797  Else
1801  Else
1802  expected = 3
1805  Return 0
1807  Case stage == ZSTDds_decompressLastBlock
1808  Case stage == ZSTDds_decompressBlock
1811  Case bType == bt_compressed
1811  Break
1812  Case bType == bt_raw
1812  Break
1813  Case bType == bt_rle
1813  Break
1814  Case bType == bt_reserved
1815  Default
1817  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 rSize
1819  If checksumFlag Then xxh64_update( & xxhState, dst, rSize)
1822  If stage == ZSTDds_decompressLastBlock Then
1823  If checksumFlag Then
1824  expected = 4
1826  Else
1830  Else
1833  previousDstEnd = dst + rSize
1835  Return rSize
1837  Case stage == ZSTDds_checkChecksum
1838  h32 = xxh64_digest( & xxhState)
1839  check32 = ZSTD_readLE32(src)
1840  If check32 != h32 Then Return -***************************************** Error codes handling(checksum_wrong)
1842  expected = 0
1843  stage = ZSTDds_getFrameHeaderSize
1844  Return 0
1846  Case stage == ZSTDds_decodeSkippableHeader
1847  No 3D Now!(headerBuffer + ZSTD_frameHeaderSize_prefix, src, expected)
1848  expected = ZSTD_readLE32(headerBuffer + 4)
1849  stage = ZSTDds_skipFrame
1850  Return 0
1852  Case stage == ZSTDds_skipFrame
1853  expected = 0
1854  stage = ZSTDds_getFrameHeaderSize
1855  Return 0
1857  Default
1858  Return -***************************************** Error codes handling(GENERIC)
Caller
NameDescribe
ZSTD_decompressStream