函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\decompress.c Create Date:2022-07-27 08:05:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: : the compressed size of the frame starting at `src`

函数原型:size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)

返回类型:size_t

参数:

类型参数名称
const void *src
size_tsrcSize

摘要:ZSTD_findFrameCompressedSize() :* compatible with legacy mode* `src` must point to the start of a ZSTD frame, ZSTD legacy frame, or skippable frame* `srcSize` must be at least as large as the frame contained

1512  如果srcSize大于等于magic number + skippable frame length ZSTD_readLE32(src)按位与0xFFFFFFF0U的值恒等于ZSTD_MAGIC_SKIPPABLE_START
1513  返回:magic number + skippable frame length ZSTD_readLE32((constBYTE * )src + 4)
1514  否则
1515  ip等于src
1516  ipstart等于ip
1517  remainingSize等于srcSize
1520  headerSize等于 : size of the Frame Header
1521  如果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.则返回:headerSize
1526  ret等于 : 0, `fparamsPtr` is correctly filled,
1527  如果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.则返回:ret
1529  如果ret大于0则返回:-***************************************** Error codes handling(srcSize_wrong)
1533  ip加等于headerSize
1534  remainingSize减等于headerSize
1537  当1循环
1539  cBlockSize等于! ZSTD_getcBlockSize() :* Provides the size of compressed block from block header `src`
1540  如果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.则返回:cBlockSize
1543  如果ZSTD_blockHeaderSizecBlockSize大于remainingSize则返回:-***************************************** Error codes handling(srcSize_wrong)
1546  ip加等于ZSTD_blockHeaderSizecBlockSize
1547  remainingSize减等于ZSTD_blockHeaderSizecBlockSize
1549  如果lastBlock退出
1553  如果checksumFlag
1554  如果remainingSize小于4则返回:-***************************************** Error codes handling(srcSize_wrong)
1556  ip加等于4
1557  remainingSize减等于4
1560  返回:ipipstart
调用者
名称描述
ZSTD_findDecompressedSize : decompressed size of the frames contained
ZSTD_decompressStream