Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:05:35 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ZSTD_compressStream_generic
Proto:static size_t ZSTD_compressStream_generic(ZSTD_CStream *zcs, void *dst, size_t *dstCapacityPtr, const void *src, size_t *srcSizePtr, ZSTD_flush_e const flush)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| ZSTD_CStream * | zcs | |
| void * | dst | |
| size_t * | dstCapacityPtr | |
| const void * | src | |
| size_t * | srcSizePtr | |
| ZSTD_flush_e const | flush |
| 3131 | someMoreWork = 1 |
| 3133 | iend = istart + srcSizePtr |
| 3136 | oend = ostart + dstCapacityPtr |
| 3139 | When someMoreWork cycle |
| 3147 | toLoad = inBuffTarget - inBuffPos |
| 3151 | If inBuffPos == inToCompress || Not flush && toLoad != loaded Then |
| 3152 | someMoreWork = 0 |
| 3153 | Break |
| 3160 | iSize = inBuffPos - inToCompress |
| 3162 | If oSize >= -************************************** Helper functions Then cDst = op |
| 3164 | Else cDst = outBuff , oSize = outBuffSize |
| 3166 | cSize = If flush == zsf_end Then ZSTD_compressEnd(cctx, cDst, oSize, inBuff + inToCompress, iSize) Else ZSTD_compressContinue(cctx, cDst, oSize, inBuff + inToCompress, iSize) |
| 3168 | 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 cSize |
| 3170 | If flush == zsf_end Then frameEnded = 1 |
| 3173 | inBuffTarget = inBuffPos + blockSize |
| 3174 | If inBuffTarget > inBuffSize Then inBuffPos = 0 , inBuffTarget = blockSize |
| 3176 | inToCompress = inBuffPos |
| 3181 | outBuffContentSize = cSize |
| 3182 | outBuffFlushedSize = 0 |
| 3183 | stage = zcss_flush |
| 3187 | Case stage == zcss_flush |
| 3188 | toFlush = outBuffContentSize - outBuffFlushedSize |
| 3189 | flushed = ZSTD_limitCopy(op, oend - op, outBuff + outBuffFlushedSize, toFlush) |
| 3191 | outBuffFlushedSize += flushed |
| 3193 | someMoreWork = 0 |
| 3194 | Break |
| 3196 | outBuffContentSize = outBuffFlushedSize = 0 |
| 3198 | Break |
| 3201 | Case stage == zcss_final |
| 3202 | someMoreWork = 0 |
| 3203 | Break |
| 3205 | Default |
| 3210 | srcSizePtr = ip - istart |
| 3211 | dstCapacityPtr = op - ostart |
| 3212 | inputProcessed += srcSizePtr |
| 3213 | If frameEnded Then Return 0 |
| 3216 | hintInSize = inBuffTarget - inBuffPos |
| 3217 | If hintInSize == 0 Then hintInSize = blockSize |
| 3219 | Return hintInSize |
| Name | Describe |
|---|---|
| ZSTD_compressStream | |
| ZSTD_flushStream | : amount of data remaining to flush |
| ZSTD_endStream |
| 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 |