Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
ZSTD_DCtx * | dctx | |
void * | dst | |
size_t | dstCapacity | |
const void ** | srcPtr | |
size_t * | srcSizePtr |
1570 | oend = ostart + dstCapacity |
1572 | remainingSize = srcSizePtr |
1575 | If remainingSize < ZSTD_frameHeaderSize_min + ZSTD_blockHeaderSize Then Return -***************************************** Error codes handling(srcSize_wrong) |
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 | decodedSize = ZSTD_decompressBlock_internal(dctx, op, oend - op, ip, cBlockSize) |
1604 | Break |
1605 | decodedSize = ZSTD_copyRawBlock(op, oend - op, ip, cBlockSize) |
1605 | Break |
1606 | decodedSize = ZSTD_generateNxBytes(op, oend - op, * ip, origSize) |
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 |
1636 | srcSizePtr = remainingSize |
Name | Describe |
---|---|
ZSTD_decompressMultiFrame |
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 |