Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: : nb of bytes written into dst (or an error code)

Proto:static size_t ZSTD_writeEpilogue(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CCtx *cctx
void *dst
size_tdstCapacity

Brief:! ZSTD_writeEpilogue() :* Ends a frame.

2767  ostart = dst
2768  op = ostart
2769  fhSize = 0
2771  If stage == ZSTDcs_created Then Return -***************************************** Error codes handling(stage_wrong)
2775  If stage == ZSTDcs_init Then
2776  fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, params, 0, 0)
2777  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 fhSize
2779  dstCapacity -= fhSize
2780  op += fhSize
2781  stage = ZSTDcs_ongoing
2784  If stage != ZSTDcs_ending Then
2786  cBlockHeader24 = 1 + (bt_raw << 1) + 0
2787  If dstCapacity < 4 Then Return -***************************************** Error codes handling(dstSize_tooSmall)
2789  ZSTD_writeLE32(op, cBlockHeader24)
2790  op += ZSTD_blockHeaderSize
2791  dstCapacity -= ZSTD_blockHeaderSize
2794  If checksumFlag Then
2795  checksum = xxh64_digest( & xxhState)
2796  If dstCapacity < 4 Then Return -***************************************** Error codes handling(dstSize_tooSmall)
2798  ZSTD_writeLE32(op, checksum)
2799  op += 4
2802  stage = ZSTDcs_created
2803  Return op - ostart
Caller
NameDescribe
ZSTD_compressEnd