facebook/zstd

Refactor ZSTD_estimateCCtxSize_usingCCtxParams_internal()

オープン

#3,404 opened on 2022/12/28

 (5 件のコメント) (1 件のリアクション) (1 人の担当者)C (2,481 件のフォーク)batch import
enhancementgood first issuelong-term

Repository metrics

Stars
 (27,100 個のスター)
PR merge metrics
 (PR metrics pending)

説明

ZSTD_estimateCCtxSize_usingCCtxParams_internal() currently takes a long list of parameters. Some (all?) of the parameters are extracted from external ZSTD_CCtx_params objects and passed in one by one. It would be cleaner to reduce the number of parameters by directly passing in a ZSTD_CCtx_params const*.

This should be an easy refactor. Code pointer: https://github.com/facebook/zstd/blob/90597d78eadadae7acf3633ab4d81ef7c4e6057f/lib/compress/zstd_compress.c#L1488-L1495

コントリビューターガイド