]> git.ipfire.org Git - thirdparty/zstd.git/commit
[lib] Set ZSTD_c_stable{In,Out}Buffer in ZSTD_compress2()
authorNick Terrell <terrelln@fb.com>
Mon, 12 Oct 2020 20:51:35 +0000 (13:51 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 30 Oct 2020 17:55:34 +0000 (10:55 -0700)
commit809b2f2071c032a71cb91441db94e3f3825d2087
tree641d66f454fce614f6218250c1172d24e79533b4
parentc74be3f6de267f2ab04a2ea89429fe112fb96ba6
[lib] Set ZSTD_c_stable{In,Out}Buffer in ZSTD_compress2()

Sets these parameters in ZSTD_compress2() then resets them to their
orignal values after the compression call.

An alternative design could be to add a flush mode `ZSTD_e_singlePass`
which implies `ZSTD_c_stable{In,Out}Buffer` but only for a single
compression call, by directly setting the applied parameters. I've opted
for the smaller change, but this is open for discussion.
lib/compress/zstd_compress.c