Function report |
Source Code:lib\zstd\decompress.c |
Create Date:2022-07-28 07:06:46 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: : decompressed size of the frames contained
Proto:unsigned long long ZSTD_findDecompressedSize(const void *src, size_t srcSize)
Type:unsigned long long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const void * | src | |
| size_t | srcSize |
| 322 | totalDstSize = 0 |
| 323 | When srcSize >= ZSTD_frameHeaderSize_prefix cycle |
| 324 | magicNumber = ZSTD_readLE32(src) |
| 326 | If (magicNumber & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START Then |
| 328 | If srcSize < magic number + skippable frame length Then Return -***************************************** Error codes handling(srcSize_wrong) |
| 330 | skippableSize = ZSTD_readLE32((constBYTE * )src + 4) + magic number + skippable frame length |
| 331 | If srcSize < skippableSize Then |
| 332 | Return ZSTD_CONTENTSIZE_ERROR |
| 335 | src = src + skippableSize |
| 336 | srcSize -= skippableSize |
| 337 | Continue |
| 342 | If ret >= ZSTD_CONTENTSIZE_ERROR Then Return ret |
| 346 | If totalDstSize + ret < totalDstSize Then Return ZSTD_CONTENTSIZE_ERROR |
| 348 | totalDstSize += ret |
| 353 | Return ZSTD_CONTENTSIZE_ERROR |
| 356 | src = src + frameSrcSize |
| 357 | srcSize -= frameSrcSize |
| 361 | If srcSize Then |
| 362 | Return ZSTD_CONTENTSIZE_ERROR |
| 365 | Return totalDstSize |
| 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_findDecompressedSize() :* compatible with legacy mode* `srcSize` must be the exact length of some number of ZSTD compressed and/or* skippable frames