facebook/zstd

Refactor ZSTD_estimateCCtxSize_usingCCtxParams_internal()

開放

#3,404 建立於 2022年12月28日

 (5 則留言) (1 個反應) (1 位負責人)C (2,481 個分叉)batch import
enhancementgood first issuelong-term

倉庫指標

星標
 (27,100 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南