facebook/zstd

Refactor ZSTD_estimateCCtxSize_usingCCtxParams_internal()

Open

#3404 aperta il 28 dic 2022

Vedi su GitHub
 (5 commenti) (1 reazione) (1 assegnatario)C (2481 fork)batch import
enhancementgood first issuelong-term

Metriche repository

Star
 (27.100 star)
Metriche merge PR
 (Merge medio 50m) (2 PR mergiate in 30 g)

Descrizione

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

Guida contributor