]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Document memory requirements for COVER algorithm 509/head
authorNick Terrell <terrelln@fb.com>
Tue, 10 Jan 2017 01:00:12 +0000 (17:00 -0800)
committerNick Terrell <terrelln@fb.com>
Tue, 10 Jan 2017 02:20:10 +0000 (18:20 -0800)
lib/dictBuilder/zdict.h

index b99990c37ffed181817e63b0851ccb8c4c410607..1b3bcb5b7cdf4fdd31e7fad9e67a3ab34d6e5241 100644 (file)
@@ -108,6 +108,7 @@ typedef struct {
     The resulting dictionary will be saved into `dictBuffer`.
     @return : size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
               or an error code, which can be tested with ZDICT_isError().
+    Note : COVER_trainFromBuffer() requires about 9 bytes of memory for each input byte.
     Tips : In general, a reasonable dictionary has a size of ~ 100 KB.
            It's obviously possible to target smaller or larger ones, just by specifying different `dictBufferCapacity`.
            In general, it's recommended to provide a few thousands samples, but this can vary a lot.
@@ -131,6 +132,7 @@ ZDICTLIB_API size_t COVER_trainFromBuffer(void* dictBuffer, size_t dictBufferCap
     @return : size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
               or an error code, which can be tested with ZDICT_isError().
               On success `*parameters` contains the parameters selected.
+    Note : COVER_optimizeTrainFromBuffer() requires about 9 bytes of memory for each input byte.
 */
 ZDICTLIB_API size_t COVER_optimizeTrainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
                                      const void* samplesBuffer, const size_t *samplesSizes, unsigned nbSamples,