]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added code comments for new API ZSTD_seekTable 2518/head
authorYann Collet <cyan@fb.com>
Thu, 4 Mar 2021 06:54:04 +0000 (22:54 -0800)
committerYann Collet <cyan@fb.com>
Thu, 4 Mar 2021 06:54:04 +0000 (22:54 -0800)
contrib/seekable_format/zstd_seekable.h

index b7e2d82da4a196da6dd87fb2767e29ebd392130b..d2807cfbd6f6c06a435d72340314ac4c1c786077 100644 (file)
@@ -172,6 +172,21 @@ ZSTDLIB_API size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* z
 ZSTDLIB_API unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsigned long long offset);
 
 
+/*-****************************************************************************
+*  Direct exploitation of the seekTable
+*
+*  Memory constrained use cases that manage multiple archives
+*  benefit from retaining multiple archive seek tables
+*  without retaining a ZSTD_seekable instance for each.
+*
+*  Below API allow the above-mentioned use cases
+*  to initialize a ZSTD_seekable, extract its (smaller) ZSTD_seekTable,
+*  then throw the ZSTD_seekable away to save memory.
+*
+*  Standard ZSTD operations can then be used
+*  to decompress frames based on seek table offsets.
+******************************************************************************/
+
 /*===== Independent seek table management =====*/
 ZSTDLIB_API ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs);
 ZSTDLIB_API size_t ZSTD_seekTable_free(ZSTD_seekTable* st);