Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
ZSTD_DCtx * | dctx | |
void * | dst | |
size_t | dstCapacity | |
const void * | src | |
size_t | srcSize |
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 |
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 |
1765 | If headerSize > ZSTD_frameHeaderSize_prefix Then |
1767 | stage = ZSTDds_decodeFrameHeader |
1768 | Return 0 |
1770 | expected = 0 |
1773 | Case stage == ZSTDds_decodeFrameHeader |
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 |
1788 | If cBlockSize Then |
1789 | stage = If lastBlock Then ZSTDds_decompressLastBlock Else ZSTDds_decompressBlock |
1790 | Return 0 |
1793 | If lastBlock Then |
1794 | If checksumFlag Then |
1795 | expected = 4 |
1796 | stage = ZSTDds_checkChecksum |
1797 | Else |
1798 | expected = 0 |
1799 | stage = ZSTDds_getFrameHeaderSize |
1801 | Else |
1802 | expected = 3 |
1803 | stage = ZSTDds_decodeBlockHeader |
1805 | Return 0 |
1807 | Case stage == ZSTDds_decompressLastBlock |
1808 | Case stage == ZSTDds_decompressBlock |
1811 | Case bType == bt_compressed |
1811 | rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize) |
1811 | Break |
1812 | rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize) |
1812 | Break |
1813 | rSize = ZSTD_setRleBlock(dst, dstCapacity, src, srcSize, rleSize) |
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 |
1825 | stage = ZSTDds_checkChecksum |
1826 | Else |
1827 | expected = 0 |
1828 | stage = ZSTDds_getFrameHeaderSize |
1830 | Else |
1831 | stage = ZSTDds_decodeBlockHeader |
1832 | expected = ZSTD_blockHeaderSize |
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 |
1852 | Case stage == ZSTDds_skipFrame |
1857 | Default |
Name | Describe |
---|---|
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_decompressContinue() :* or an error code, which can be tested using ZSTD_isError()