Function report |
Source Code:lib\zstd\decompress.c |
Create Date:2022-07-28 07:06:51 |
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 read from src (< srcSize )
Proto:size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx *dctx, const void *src, size_t srcSize)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
ZSTD_DCtx * | dctx | |
const void * | src | |
size_t | srcSize |
434 | If srcSize < r a non-null block Then Return -***************************************** Error codes handling(corruption_detected) |
439 | litEncType = istart[0] & 3 |
442 | Case litEncType == set_repeat |
443 | If litEntropy == 0 Then Return -***************************************** Error codes handling(dictionary_corrupted) |
446 | Case litEncType == set_compressed |
447 | If srcSize < 5 Then Return -***************************************** Error codes handling(corruption_detected) |
451 | singleStream = 0 |
453 | lhc = ZSTD_readLE32(istart) |
455 | Case lhlCode == 0 |
456 | Case lhlCode == 1 |
457 | Default |
464 | Case lhlCode == 2 |
470 | Case lhlCode == 3 |
472 | lhSize = 5 |
475 | Break |
477 | If litSize > Define for static allocation Then Return -***************************************** Error codes handling(corruption_detected) |
479 | If litCSize + lhSize > srcSize Then Return -***************************************** Error codes handling(corruption_detected) |
482 | If HUF_isError((litEncType == set_repeat) ? (singleStream ? Generic decompression selector : HUF_decompress4X_usingDTable(litBuffer, litSize, istart + lhSize, litCSize, HUFptr)) : (singleStream ? HUF_decompress1X2_DCtx_wksp(hufTable, litBuffer, litSize, istart + lhSize, litCSize, workspace, size of workspace ) : HUF_decompress4X_hufOnly_wksp(hufTable, litBuffer, litSize, istart + lhSize, litCSize, workspace, size of workspace ))) Then Return -***************************************** Error codes handling(corruption_detected) |
495 | litEntropy = 1 |
496 | If litEncType == set_compressed Then HUFptr = hufTable |
502 | Case litEncType == set_basic |
506 | Case lhlCode == 0 |
507 | Case lhlCode == 2 |
508 | Default |
512 | Case lhlCode == 1 |
516 | Case lhlCode == 3 |
523 | If litSize + lhSize > srcSize Then Return -***************************************** Error codes handling(corruption_detected) |
525 | No 3D Now!(litBuffer, istart + lhSize, litSize) |
537 | Case litEncType == set_rle |
541 | Case lhlCode == 0 |
542 | Case lhlCode == 2 |
543 | Default |
547 | Case lhlCode == 1 |
551 | Case lhlCode == 3 |
552 | lhSize = 3 |
553 | litSize = ZSTD_readLE24(istart) >> 4 |
554 | If srcSize < 4 Then Return -***************************************** Error codes handling(corruption_detected) |
556 | Break |
558 | If litSize > Define for static allocation Then Return -***************************************** Error codes handling(corruption_detected) |
560 | memset(litBuffer, istart[lhSize], litSize + ! ZSTD_wildcopy() :* custom version of memcpy(), can copy up to 7 bytes too many (8 bytes if length==0) ) |
563 | Return lhSize + 1 |
565 | Default |
Name | Describe |
---|---|
ZSTD_decompressBlock_internal |
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_decodeLiteralsBlock() :