Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-28 07:05:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ZSTD_endStream

Proto:size_t ZSTD_endStream(ZSTD_CStream *zcs, ZSTD_outBuffer *output)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CStream *zcs
ZSTD_outBuffer *output
3253  ostart = dst + pos
3254  oend = dst + size
3255  op = ostart
3257  If pledgedSrcSize && inputProcessed != pledgedSrcSize Then Return -***************************************** Error codes handling(srcSize_wrong)
3260  If stage != zcss_final Then
3262  srcSize = 0
3263  sizeWritten = size - pos
3264  notEnded = ZSTD_compressStream_generic(zcs, ostart, & sizeWritten, & srcSize, & srcSize, zsf_end)
3266  remainingToFlush = outBuffContentSize - outBuffFlushedSize
3267  op += sizeWritten
3268  If remainingToFlush Then
3269  pos += sizeWritten
3273  stage = zcss_final
3274  outBuffContentSize = If Not notEnded Then 0 Else ZSTD_compressEnd(cctx, outBuff, outBuffSize, NULL, 0)
3280  toFlush = outBuffContentSize - outBuffFlushedSize
3281  flushed = ZSTD_limitCopy(op, oend - op, outBuff + outBuffFlushedSize, toFlush)
3282  op += flushed
3283  outBuffFlushedSize += flushed
3284  pos += op - ostart
3285  If toFlush == flushed Then stage = zcss_init
3287  Return toFlush - flushed