]> git.ipfire.org Git - thirdparty/zstd.git/commit
seekable_format: Prevent rereading frame when seeking forward
authorYoni Gilad <yonig@radcom.com>
Thu, 17 Feb 2022 17:46:29 +0000 (19:46 +0200)
committerYann Collet <cyan@fb.com>
Thu, 30 Mar 2023 04:24:12 +0000 (21:24 -0700)
commit618bf84e0d16070ac67a80b404041adb264c4952
tree43fb38592a98dc89dafc4882ac9b9f36a8aa0467
parent871f3a402653697a22eb892c19db295333a85168
seekable_format: Prevent rereading frame when seeking forward

When decompressing a seekable file, if seeking forward within
a frame (by issuing multiple ZSTD_seekable_decompress calls
with a small gap between them), the frame will be unnecessarily
reread from the beginning. This patch makes it continue using
the current frame data and simply skip over the unneeded bytes.
contrib/seekable_format/zstdseek_decompress.c