]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixes for @terrelln comments
authorYann Collet <cyan@fb.com>
Thu, 18 Jan 2018 19:15:23 +0000 (11:15 -0800)
committerYann Collet <cyan@fb.com>
Thu, 18 Jan 2018 19:15:23 +0000 (11:15 -0800)
lib/compress/zstd_compress_internal.h
lib/compress/zstdmt_compress.c
lib/zstd.h

index 899c5b08b0ef7a757689e24e4a7d6909d4ef3a7c..64f03a0d27c62ce19e2d5bdd1e63ac73d46353bc 100644 (file)
@@ -170,9 +170,9 @@ struct ZSTD_CCtx_s {
     void* workSpace;
     size_t workSpaceSize;
     size_t blockSize;
-    U64 pledgedSrcSizePlusOne;  /* this way, 0 (default) == unknown */
-    U64 consumedSrcSize;
-    U64 producedCSize;
+    unsigned long long pledgedSrcSizePlusOne;  /* this way, 0 (default) == unknown */
+    unsigned long long consumedSrcSize;
+    unsigned long long producedCSize;
     XXH64_state_t xxhState;
     ZSTD_customMem customMem;
     size_t staticSize;
index 5624b5e3dd9d67a2deb3676c22cb407a21562323..f9a25270a7c93504a6e723ec2e97d8640a0a6249 100644 (file)
@@ -662,7 +662,7 @@ unsigned ZSTDMT_getNbThreads(const ZSTDMT_CCtx* mtctx)
 /* ZSTDMT_getFrameProgression():
  * tells how much data has been consumed (input) and produced (output) for current frame.
  * able to count progression inside worker threads.
- * Note : mutex will be triggered during statistics collection. */
+ * Note : mutex will be acquired during statistics collection. */
 ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx)
 {
     ZSTD_frameProgression fs;
index a34d37f0b8a3c0c89653a1a11d724a95128088f5..aab6be3b0c20938c775b821c3ffa4ca6d5ba947f 100644 (file)
@@ -723,8 +723,10 @@ typedef struct {
 } ZSTD_frameProgression;
 
 /* ZSTD_getFrameProgression():
- * tells how much data has been consumed (input) and produced (output) for current frame.
- * able to count progression inside worker threads (non-blocking mode).
+ * tells how much data has been ingested (read from input)
+ * consumed (input actually compressed) and produced (output) for current frame.
+ * Therefore, (ingested - consumed) is amount of input data buffered internally, not yet compressed.
+ * Can report progression inside worker threads (multi-threading and non-blocking mode).
  */
 ZSTD_frameProgression ZSTD_getFrameProgression(const ZSTD_CCtx* cctx);