Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:05:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ZSTD_writeFrameHeader
Proto:static size_t ZSTD_writeFrameHeader(void *dst, size_t dstCapacity, ZSTD_parameters params, U64 pledgedSrcSize, U32 dictID)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| void * | dst | |
| size_t | dstCapacity | |
| ZSTD_parameters | params | |
| U64 | pledgedSrcSize | |
| U32 | dictID |
| 2434 | dictIDSizeCode = (dictID > 0) + (dictID >= 256 + (dictID >= 65536 |
| 2435 | checksumFlag = checksumFlag > 0 |
| 2436 | windowSize = 1U << windowLog |
| 2437 | singleSegment = contentSizeFlag && windowSize >= pledgedSrcSize |
| 2438 | windowLogByte = windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN << 3 |
| 2439 | fcsCode = If contentSizeFlag Then (pledgedSrcSize >= 256 + (pledgedSrcSize >= 65536 + 256 + (pledgedSrcSize >= 0xFFFFFFFFU Else 0 |
| 2441 | frameHeaderDecriptionByte = dictIDSizeCode + (checksumFlag << 2) + (singleSegment << 5) + (fcsCode << 6) |
| 2444 | If dstCapacity < ZSTD_frameHeaderSize_max Then Return -***************************************** Error codes handling(dstSize_tooSmall) |
| 2447 | ZSTD_writeLE32(dst, >= v0.8.0 ) |
| 2448 | op[4] = frameHeaderDecriptionByte |
| 2449 | pos = 5 |
| 2450 | If Not singleSegment Then op[pos++] = windowLogByte |
| 2453 | Default |
| 2454 | Case dictIDSizeCode == 0 |
| 2454 | Break |
| 2455 | Case dictIDSizeCode == 1 |
| 2459 | Case dictIDSizeCode == 2 |
| 2463 | Case dictIDSizeCode == 3 |
| 2464 | ZSTD_writeLE32(op + pos, dictID) |
| 2465 | pos += 4 |
| 2466 | Break |
| 2469 | Default |
| 2470 | Case fcsCode == 0 |
| 2471 | If singleSegment Then op[pos++] = pledgedSrcSize |
| 2473 | Break |
| 2474 | Case fcsCode == 1 |
| 2478 | Case fcsCode == 2 |
| 2482 | Case fcsCode == 3 |
| 2487 | Return pos |
| Name | Describe |
|---|---|
| ZSTD_compressContinue_internal | |
| ZSTD_writeEpilogue | : nb of bytes written into dst (or an error code) |
| 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 |