]> git.ipfire.org Git - thirdparty/zstd.git/commit
separate newRep() from updateRep()
authorYann Collet <cyan@fb.com>
Tue, 28 Dec 2021 19:46:15 +0000 (11:46 -0800)
committerYann Collet <cyan@fb.com>
Tue, 28 Dec 2021 19:52:33 +0000 (11:52 -0800)
commit6fa640ef70d01489e2a4a6228f4e439b712f7d68
tree6f4cc8394f74bbcc9993cb218112e6450286d651
parent321583ccf508e300d68f6ea3e6fcf9adb13d2a47
separate newRep() from updateRep()

the new contracts seems to make more sense :
updateRep() updates an array of repeat offsets _in place_,
while newRep() generates a new structure with the updated repeat-offset array.

Most callers are actually expecting the in-place variant,
and a limited sub-section, in `zstd_opt.c` mainly, prefer `newRep()`.
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstd_compress_superblock.c
lib/compress/zstd_opt.c