Function report |
Source Code:lib\zstd\decompress.c |
Create Date:2022-07-28 07:07:22 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: : the compressed size of the frame starting at `src`
Proto:size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
const void * | src | |
size_t | srcSize |
1512 | If srcSize >= magic number + skippable frame length && (ZSTD_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START Then |
1513 | Return magic number + skippable frame length + ZSTD_readLE32((constBYTE * )src + 4) |
1514 | Else |
1517 | remainingSize = srcSize |
1527 | 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 ret |
1529 | If ret > 0 Then Return -***************************************** Error codes handling(srcSize_wrong) |
1533 | ip += headerSize |
1534 | remainingSize -= headerSize |
1537 | When 1 cycle |
1539 | cBlockSize = ! ZSTD_getcBlockSize() :* Provides the size of compressed block from block header `src` |
1540 | 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 |
1543 | If ZSTD_blockHeaderSize + cBlockSize > remainingSize Then Return -***************************************** Error codes handling(srcSize_wrong) |
1546 | ip += ZSTD_blockHeaderSize + cBlockSize |
1547 | remainingSize -= ZSTD_blockHeaderSize + cBlockSize |
1549 | If lastBlock Then Break |
1553 | If checksumFlag Then |
1554 | If remainingSize < 4 Then Return -***************************************** Error codes handling(srcSize_wrong) |
1556 | ip += 4 |
1557 | remainingSize -= 4 |
Name | Describe |
---|---|
ZSTD_findDecompressedSize | : decompressed size of the frames contained |
ZSTD_decompressStream |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |
Brief: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