]> git.ipfire.org Git - thirdparty/zstd.git/commit
zstd_decompress: use a helper function for context create 2805/head
authorNorbert Lange <nolange79@gmail.com>
Sun, 26 Sep 2021 08:59:05 +0000 (10:59 +0200)
committerNorbert Lange <nolange79@gmail.com>
Sun, 26 Sep 2021 12:41:37 +0000 (14:41 +0200)
commit6763f403318034372b8d52de73a23066d04ec750
tree659c9e35ea05d5eda3e3fcdc5803e15958502284
parent0d455406950cbd5c2ab737e0a9d03a5d86c8e603
zstd_decompress: use a helper function for context create

Multiple ZSTD_createDCtx* functions call other (public)
ZSTD_createDCtx* functions, this makes it harder for humans
and compilers to throw out code that is not used.

This farms out the logic into a static function, if a program
only uses a single ZSTD_createDCtx variant, all others can be easily
dropped and the remaining implementation can be specialized.
lib/decompress/zstd_decompress.c