]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Typo and grammar fixes
authorDominique Pelle <dominique.pelle@gmail.com>
Sat, 12 Mar 2022 07:52:40 +0000 (08:52 +0100)
committerDominique Pelle <dominique.pelle@gmail.com>
Sat, 12 Mar 2022 07:58:04 +0000 (08:58 +0100)
52 files changed:
.github/ISSUE_TEMPLATE/bug_report.md
CONTRIBUTING.md
build/cmake/README.md
build/single_file_libs/build_decoder_test.sh
build/single_file_libs/build_library_test.sh
build/single_file_libs/combine.py
build/single_file_libs/zstd-in.c
build/single_file_libs/zstddeclib-in.c
contrib/match_finders/README.md
contrib/match_finders/zstd_edist.c
contrib/match_finders/zstd_edist.h
contrib/pzstd/utils/ScopeGuard.h
doc/zstd_compression_format.md
doc/zstd_manual.html
lib/README.md
lib/common/bitstream.h
lib/common/fse.h
lib/common/fse_decompress.c
lib/common/xxhash.h
lib/compress/zstd_compress.c
lib/compress/zstd_compress_sequences.c
lib/compress/zstd_compress_superblock.c
lib/compress/zstd_lazy.c
lib/compress/zstd_ldm.c
lib/compress/zstdmt_compress.c
lib/decompress/zstd_decompress.c
lib/decompress/zstd_decompress_block.c
lib/dictBuilder/cover.c
lib/dictBuilder/fastcover.c
lib/dll/example/README.md
lib/legacy/zstd_v02.c
lib/legacy/zstd_v03.c
lib/legacy/zstd_v04.c
lib/legacy/zstd_v05.c
lib/legacy/zstd_v06.c
lib/legacy/zstd_v07.c
lib/zdict.h
lib/zstd.h
programs/benchfn.h
programs/fileio.c
programs/util.c
programs/zstd.1
programs/zstd.1.md
programs/zstdcli.c
tests/README.md
tests/automated_benchmarking.py
tests/fuzz/fuzz.py
tests/fuzz/sequence_compression_api.c
tests/fuzz/simple_compress.c
tests/fuzzer.c
tests/paramgrill.c
zlibWrapper/README.md

index bacdac27b06bc80b1d69c4f436b4b06078113bc0..755a46af1458404de9f582a510d26af9746a1f8a 100644 (file)
@@ -26,8 +26,8 @@ If applicable, add screenshots and charts to help explain your problem.
 **Desktop (please complete the following information):**
  - OS: [e.g. Mac]
  - Version [e.g. 22]
- - Compiler [e.g gcc]
- - Flags [e.g O2]
+ - Compiler [e.g. gcc]
+ - Flags [e.g. O2]
  - Other relevant hardware specs [e.g. Dual-core]
  - Build system [e.g. Makefile]
 
index e7e545129e51cd489135e0696941524bd6829c2f..f5e747ae1b9e8b6adc7ccbb988c296972fe84ad3 100644 (file)
@@ -7,7 +7,7 @@ New versions are being developed in the "dev" branch,
 or in their own feature branch.
 When they are deemed ready for a release, they are merged into "release".
 
-As a consequences, all contributions must stage first through "dev"
+As a consequence, all contributions must stage first through "dev"
 or their own feature branch.
 
 ## Pull Requests
@@ -134,11 +134,11 @@ It can be useful to look at additional static analyzers once in a while (and we
 - Static analyzers are full of false positive. The signal to noise ratio is actually pretty low.
 - A good CI policy is "zero-warning tolerance". That means that all issues must be solved, including false positives. This quickly becomes a tedious workload.
 - Multiple static analyzers will feature multiple kind of false positives, sometimes applying to the same code but in different ways leading to :
-   + torteous code, trying to please multiple constraints, hurting readability and therefore maintenance. Sometimes, such complexity introduce other more subtle bugs, that are just out of scope of the analyzers.
+   + tortuous code, trying to please multiple constraints, hurting readability and therefore maintenance. Sometimes, such complexity introduce other more subtle bugs, that are just out of scope of the analyzers.
    + sometimes, these constraints are mutually exclusive : if one try to solve one, the other static analyzer will complain, they can't be both happy at the same time.
 - As if that was not enough, the list of false positives change with each version. It's hard enough to follow one static analyzer, but multiple ones with their own update agenda, this quickly becomes a massive velocity reducer.
 
-This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kind of reports can be useful, and are accepted.
+This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kinds of reports can be useful, and are accepted.
 
 ## Continuous Integration
 CI tests run every time a pull request (PR) is created or updated. The exact tests
@@ -197,7 +197,7 @@ something subtle merged is extensive benchmarking. You will be doing us a great
 take the time to run extensive, long-duration, and potentially cross-(os, platform, process, etc)
 benchmarks on your end before submitting a PR. Of course, you will not be able to benchmark
 your changes on every single processor and os out there (and neither will we) but do that best
-you can:) We've adding some things to think about when benchmarking below in the Benchmarking
+you can:) We've added some things to think about when benchmarking below in the Benchmarking
 Performance section which might be helpful for you.
 3. Optimizing performance for a certain OS, processor vendor, compiler, or network system is a perfectly
 legitimate thing to do as long as it does not harm the overall performance health of Zstd.
@@ -273,7 +273,7 @@ for that options you have just provided. If you want to look at the internals of
 benchmarking script works, you can check out programs/benchzstd.c
 
 For example: say you have made a change that you believe improves the speed of zstd level 1. The
-very first thing you should use to asses whether you actually achieved any sort of improvement
+very first thing you should use to assess whether you actually achieved any sort of improvement
 is `zstd -b`. You might try to do something like this. Note: you can use the `-i` option to
 specify a running time for your benchmark in seconds (default is 3 seconds).
 Usually, the longer the running time, the more stable your results will be.
@@ -299,7 +299,7 @@ this method of evaluation will not be sufficient.
 ### Profiling
 There are a number of great profilers out there. We're going to briefly mention how you can
 profile your code using `instruments` on mac, `perf` on linux and `visual studio profiler`
-on windows.
+on Windows.
 
 Say you have an idea for a change that you think will provide some good performance gains
 for level 1 compression on Zstd. Typically this means, you have identified a section of
@@ -315,8 +315,8 @@ might be).
 
 Most profilers (including the profilers discussed below) will generate a call graph of
 functions for you. Your goal will be to find your function of interest in this call graph
-and then inspect the time spent inside of it. You might also want to to look at the
-annotated assembly which most profilers will provide you with.
+and then inspect the time spent inside of it. You might also want to look at the annotated
+assembly which most profilers will provide you with.
 
 #### Instruments
 We will once again consider the scenario where you think you've identified a piece of code
@@ -330,7 +330,7 @@ Instruments.
     * You will want a benchmark that runs for at least a few seconds (5 seconds will
     usually be long enough). This way the profiler will have something to work with
     and you will have ample time to attach your profiler to this process:)
-    * I will just use benchzstd as my bencharmking script for this example:
+    * I will just use benchzstd as my benchmarmking script for this example:
 ```
 $ zstd -b1 -i5 <my-data> # this will run for 5 seconds
 ```
@@ -455,7 +455,7 @@ This design requirement is fundamental to preserve the portability of the code b
   Any variable that can be `const` (aka. read-only) **must** be `const`.
   Any pointer which content will not be modified must be `const`.
   This property is then controlled at compiler level.
-  `const` variables are an important signal to readers that this variable isn’t modified.
+  `const` variables are an important signal to readers that this variable isn't modified.
   Conversely, non-const variables are a signal to readers to watch out for modifications later on in the function.
 * If a function must be inlined, mention it explicitly,
   using project's own portable macros, such as `FORCE_INLINE_ATTR`,
index f6854f4c05a7524d275af656a5abe8e668086731..a460dd16187ffb7108860f27a97bc58d6d010e31 100644 (file)
@@ -1,13 +1,13 @@
 # Cmake contributions
 
 Contributions to the cmake build configurations are welcome. Please
-use case sensitivity that matches modern (ie. cmake version 2.6 and above)
+use case sensitivity that matches modern (i.e. cmake version 2.6 and above)
 conventions of using lower-case for commands, and upper-case for
 variables.
 
 ## How to build
 
-As cmake doesn't support command like `cmake clean`, it's recommended to perform a "out of source build".
+As cmake doesn't support command like `cmake clean`, it's recommended to perform an "out of source build".
 To do this, you can create a new directory and build in it:
 ```sh
 cd build/cmake
index 48d017fcffa5aff1672de695d5dfb2a67f4da498..c4ca55fa5dde14e437fc7a995b864f1f31df2d33 100755 (executable)
@@ -11,7 +11,7 @@ IN_FILES="examples/emscripten.c"
 
 # Emscripten build using emcc.
 emscripten_emcc_build() {
-  # Compile the the same example as above
+  # Compile the same example as above
   CC_FLAGS="-Wall -Wextra -Wshadow -Werror -Os -g0 -flto"
   emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES
   # Did compilation work?
index 31545fc3fe3c0fc9eb2a30dfde475740c3fe252b..f4ba109ab38decc0fe6fa38ba25ec3981b3f3acc 100755 (executable)
@@ -14,7 +14,7 @@ IN_FILES="zstd.c examples/roundtrip.c"
 
 # Emscripten build using emcc.
 emscripten_emcc_build() {
-  # Compile the the same example as above
+  # Compile the same example as above
   CC_FLAGS="-Wall -Wextra -Wshadow -Werror -Os -g0 -flto"
   emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES
   # Did compilation work?
index 3d91dc3eec22a757bf587af6f30bcb87936c1835..771dd20bfb14c94ee9afaed7d67eecb82f27b1ee 100755 (executable)
@@ -107,7 +107,7 @@ def test_match_pragma() -> bool:
     return False
 
 # Finds 'file'. First the list of 'root' paths are searched, followed by the
-# the currently processing file's 'parent' path, returning a valid Path in
+# currently processing file's 'parent' path, returning a valid Path in
 # canonical form. If no match is found None is returned.
 # 
 def resolve_include(file: str, parent: Optional[Path] = None) -> Optional[Path]:
index eecd9a688ee5942eb3c351435face3242a82e38d..59c6b5f19b60dec2585686280b76f6635c0c7e99 100644 (file)
@@ -25,7 +25,7 @@
  * Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
  * defined in mem.h (breaking C99 compatibility).
  *
- * Note: the undefs for xxHash allow Zstd's implementation to coincide with with
+ * Note: the undefs for xxHash allow Zstd's implementation to coincide with
  * standalone xxHash usage (with global defines).
  *
  * Note: if you enable ZSTD_LEGACY_SUPPORT the combine.py script will need
index d0343c54a460a86bccfb0bd2b00083db46522dd2..5a58589c970005ee3a09b782dc8acce3e9c28fbe 100644 (file)
@@ -25,7 +25,7 @@
  * Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
  * defined in mem.h (breaking C99 compatibility).
  *
- * Note: the undefs for xxHash allow Zstd's implementation to coincide with with
+ * Note: the undefs for xxHash allow Zstd's implementation to coincide with
  * standalone xxHash usage (with global defines).
  *
  * Note: if you enable ZSTD_LEGACY_SUPPORT the combine.py script will need
index 0f4a3b1ce82df995bbe9af0cf81d345d097067ce..54055c37086c8c75e6d8b78d2268c1a5448b235a 100644 (file)
@@ -14,7 +14,7 @@
  * files would be small relative to the size of the file. 
  * 
  * Various 'diffing' algorithms utilize this notion of edit distance and 
- * the corrensponding concept of a minimal edit script between two 
+ * the corresponding concept of a minimal edit script between two 
  * sequences to identify the regions within two files where they differ. 
  * The core algorithm used in this match finder is described in: 
  * 
  * 
  * Note: after some experimentation, this approach proved to not provide enough 
  * utility to justify the additional CPU used in finding matches. The one area
- * where this approach consistenly outperforms Zstandard even on level 19 is 
- * when compressing small files (<10 KB) using a equally small dictionary that 
+ * where this approach consistently outperforms Zstandard even on level 19 is 
+ * when compressing small files (<10 KB) using an equally small dictionary that 
  * is very similar to the source file. For the use case that this was intended,
  * (large similar files) this approach by itself took 5-10X longer than zstd-19 and 
  * generally resulted in 2-3X larger files. The core advantage that zstd-19 has 
- * over this appraoch for match finding is the overlapping matches. This approach 
+ * over this approach for match finding is the overlapping matches. This approach 
  * cannot find any. 
  * 
  * I'm leaving this in the contrib section in case this ever becomes interesting 
index aab545fd3ba3cd4163d163f4dbd8f3c212ca2853..b5523f4e40b72cda1e8eee1d34705fc9b9a4719a 100644 (file)
@@ -12,7 +12,7 @@
 *  Dependencies
 ***************************************/
 
-/* Currently relies on qsort when combining contiguous matches. This can probabily 
+/* Currently relies on qsort when combining contiguous matches. This can probably 
  * be avoided but would require changes to the algorithm. The qsort is far from 
  * the bottleneck in this algorithm even for medium sized files so it's probably 
  * not worth trying to address */ 
@@ -26,7 +26,7 @@
 *  Constants
 ***************************************/
 
-/* Just a sential for the entires of the diagnomal matrix */
+/* Just a sential for the entires of the diagonal matrix */
 #define ZSTD_EDIST_DIAG_MAX (S32)(1 << 30)
 
 /* How large should a snake be to be considered a 'big' snake. 
@@ -39,7 +39,7 @@
 #define ZSTD_EDIST_SNAKE_ITER_THRESH 200
 
 /* After how many iterations should be just give up and take 
- * the best availabe edit script for this round */ 
+ * the best available edit script for this round */ 
 #define ZSTD_EDIST_EXPENSIVE_THRESH 1024
 
 /*-*************************************
@@ -192,7 +192,7 @@ static void ZSTD_eDist_diag(ZSTD_eDist_state* state,
         if (!useHeuristics)
             continue;
 
-        /* Everything under this point is a heuritic. Using these will 
+        /* Everything under this point is a heuristic. Using these will 
          * substantially speed up the match finding. In some cases, taking 
          * the total match finding time from several minutes to seconds.
          * Of course, the caveat is that the edit script found may no longer 
@@ -366,8 +366,8 @@ static int ZSTD_eDist_compare(ZSTD_eDist_state* state,
         }
     } else if (srcLow == srcHigh) {
         while (dictLow < dictHigh) {
-            /* Reaching this point means deleteing dict[dictLow] from 
-             * the current positino of dict */ 
+            /* Reaching this point means deleting dict[dictLow] from 
+             * the current position of dict */ 
             dictLow++;
         }
     } else {
@@ -395,7 +395,7 @@ static int ZSTD_eDist_matchComp(const void* p, const void* q)
 }
 
 /* The matches from the approach above will all be of the form 
- * (dictIdx, srcIdx, 1). this method combines contiguous matches 
+ * (dictIdx, srcIdx, 1). This method combines contiguous matches 
  * of length MINMATCH or greater. Matches less than MINMATCH 
  * are discarded */ 
 static void ZSTD_eDist_combineMatches(ZSTD_eDist_state* state)
index c775a498503283e6acab1d69386a1d583dec7586..a947649b2c86e0b38b9929ab2354f5035913ce9e 100644 (file)
@@ -21,7 +21,7 @@
  * files would be small relative to the size of the file. 
  * 
  * Various 'diffing' algorithms utilize this notion of edit distance and 
- * the corrensponding concept of a minimal edit script between two 
+ * the corresponding concept of a minimal edit script between two 
  * sequences to identify the regions within two files where they differ. 
  * The core algorithm used in this match finder is described in: 
  * 
  * 
  * Note: after some experimentation, this approach proved to not provide enough 
  * utility to justify the additional CPU used in finding matches. The one area
- * where this approach consistenly outperforms Zstandard even on level 19 is 
- * when compressing small files (<10 KB) using a equally small dictionary that 
+ * where this approach consistently outperforms Zstandard even on level 19 is 
+ * when compressing small files (<10 KB) using an equally small dictionary that 
  * is very similar to the source file. For the use case that this was intended,
  * (large similar files) this approach by itself took 5-10X longer than zstd-19 and 
  * generally resulted in 2-3X larger files. The core advantage that zstd-19 has 
- * over this appraoch for match finding is the overlapping matches. This approach 
+ * over this approach for match finding is the overlapping matches. This approach 
  * cannot find any. 
  * 
  * I'm leaving this in the contrib section in case this ever becomes interesting 
index 31768f43d22c84a5c912461787d9f4ebf63326e5..c26f911bf3c8f7be70c97642240de46d4ce42b22 100644 (file)
@@ -15,7 +15,7 @@ namespace pzstd {
 /**
  * Dismissable scope guard.
  * `Function` must be callable and take no parameters.
- * Unless `dissmiss()` is called, the callable is executed upon destruction of
+ * Unless `dismiss()` is called, the callable is executed upon destruction of
  * `ScopeGuard`.
  *
  * Example:
index fc09bd5538c5a81bad015c4251996d6f4bd22e5d..cd53b7f94213009388a19a5daddf873fd3dcc453 100644 (file)
@@ -974,7 +974,7 @@ and their content ignored, resuming decoding after the skippable frame.
 
 It can be noted that a skippable frame
 can be used to watermark a stream of concatenated frames
-embedding any kind of tracking information (even just an UUID).
+embedding any kind of tracking information (even just a UUID).
 Users wary of such possibility should scan the stream of concatenated frames
 in an attempt to detect such frame for analysis or removal.
 
index 6b45e0a99a84d6f2054c30dab8e62fcc5abe0002..4bbb513bbe5e68f1cd3ba08d56c565cc06389e46 100644 (file)
@@ -790,11 +790,11 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);  </b>/* accept NULL pointer */<b>
 </p></pre><BR>
 
 <pre><b>unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
-</b><p>  Provides the dictID required to decompressed the frame stored within `src`.
+</b><p>  Provides the dictID required to decompress the frame stored within `src`.
   If @return == 0, the dictID could not be decoded.
   This could for one of the following reasons :
   - The frame does not require a dictionary to be decoded (most common case).
-  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden information.
+  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information.
     Note : this use case also happens when using a non-conformant dictionary.
   - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`).
   - This is not a Zstandard frame.
@@ -1164,7 +1164,7 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
 <pre><b>ZSTDLIB_STATIC_API size_t ZSTD_compressSequences(ZSTD_CCtx* const cctx, void* dst, size_t dstSize,
                       const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
                       const void* src, size_t srcSize);
-</b><p> Compress an array of ZSTD_Sequence, associted with @src buffer, into dst.
+</b><p> Compress an array of ZSTD_Sequence, associated with @src buffer, into dst.
  @src contains the entire input (not just the literals).
  If @srcSize > sum(sequence.length), the remaining bytes are considered all literals
  If a dictionary is included, then the cctx should reference the dict. (see: ZSTD_CCtx_refCDict(), ZSTD_CCtx_loadDictionary(), etc.)
index 4c9d8f05912fd892035b6dc9d35d9d597fad0ebb..015cde567e589a850d1198ccb7a189816cf72595 100644 (file)
@@ -91,7 +91,7 @@ The file structure is designed to make this selection manually achievable for an
         `ZSTD_LIB_COMPRESSION, ZSTD_LIB_DECOMPRESSION`, `ZSTD_LIB_DICTBUILDER`,
         and `ZSTD_LIB_DEPRECATED` as `0` to forgo compilation of the
         corresponding features. This will also disable compilation of all
-        dependencies (eg. `ZSTD_LIB_COMPRESSION=0` will also disable
+        dependencies (e.g. `ZSTD_LIB_COMPRESSION=0` will also disable
         dictBuilder).
 
 - There are a number of options that can help minimize the binary size of
index 731630ea44b79b77032aa4be72d10cd0c612d8cd..84177862645d14c3dab4ed72f238bc22438b7dc5 100644 (file)
@@ -365,7 +365,7 @@ MEM_STATIC FORCE_INLINE_ATTR size_t BIT_readBits(BIT_DStream_t* bitD, unsigned n
 }
 
 /*! BIT_readBitsFast() :
- *  unsafe version; only works only if nbBits >= 1 */
+ *  unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits)
 {
     size_t const value = BIT_lookBitsFast(bitD, nbBits);
index bd29e9ac55cc30dc54e94a4e89ed98c27f310b8d..466a072818aefa6641c620651a684bc4ff9f1792 100644 (file)
@@ -555,7 +555,7 @@ MEM_STATIC void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* statePt
 
 /* FSE_getMaxNbBits() :
  * Approximate maximum cost of a symbol, in bits.
- * Fractional get rounded up (i.e : a symbol with a normalized frequency of 3 gives the same result as a frequency of 2)
+ * Fractional get rounded up (i.e. a symbol with a normalized frequency of 3 gives the same result as a frequency of 2)
  * note 1 : assume symbolValue is valid (<= maxSymbolValue)
  * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */
 MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue)
index 184b35dd17a05fc82cc4cd3832b2fac7bf3f9b4f..7034fd97b474017b328b054762779847fdf163a2 100644 (file)
@@ -128,10 +128,10 @@ static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* normalizedCo
             }
         }
         /* Now we spread those positions across the table.
-         * The benefit of doing it in two stages is that we avoid the the
+         * The benefit of doing it in two stages is that we avoid the
          * variable size inner loop, which caused lots of branch misses.
          * Now we can run through all the positions without any branch misses.
-         * We unroll the loop twice, since that is what emperically worked best.
+         * We unroll the loop twice, since that is what empirically worked best.
          */
         {
             size_t position = 0;
index 8ebbfdd6261690c2a64c9280915ffbbaccac4383..acac7ad62ed7a9bdc74df1b2d2fe38c9a2d7ed54 100644 (file)
@@ -1534,7 +1534,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) { return ZSTD_
  * @brief Used to prevent unwanted optimizations for @p var.
  *
  * It uses an empty GCC inline assembly statement with a register constraint
- * which forces @p var into a general purpose register (eg eax, ebx, ecx
+ * which forces @p var into a general purpose register (e.g. eax, ebx, ecx
  * on x86) and marks it as modified.
  *
  * This is used in a few places to avoid unwanted autovectorization (e.g.
@@ -2809,7 +2809,7 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
  * @ingroup tuning
  * @brief Selects the minimum alignment for XXH3's accumulators.
  *
- * When using SIMD, this should match the alignment reqired for said vector
+ * When using SIMD, this should match the alignment required for said vector
  * type, so, for example, 32 for AVX2.
  *
  * Default: Auto detected.
index aa1a9f35b9d4e8afb228cc7a49a7c087232614a1..e43bbec44fcc7c4a26595c72ab674292bda547db 100644 (file)
@@ -4211,7 +4211,7 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
     const BYTE* const iend = ip + srcSize;
     int const loadLdmDict = params->ldmParams.enableLdm == ZSTD_ps_enable && ls != NULL;
 
-    /* Assert that we the ms params match the params we're being given */
+    /* Assert that the ms params match the params we're being given */
     ZSTD_assertEqualCParams(params->cParams, ms->cParams);
 
     if (srcSize > ZSTD_CHUNKSIZE_MAX) {
@@ -5820,7 +5820,7 @@ ZSTD_validateSequence(U32 offCode, U32 matchLength,
                       size_t posInSrc, U32 windowLog, size_t dictSize)
 {
     U32 const windowSize = 1 << windowLog;
-    /* posInSrc represents the amount of data the the decoder would decode up to this point.
+    /* posInSrc represents the amount of data the decoder would decode up to this point.
      * As long as the amount of data decoded is less than or equal to window size, offsets may be
      * larger than the total length of output decoded in order to reference the dict, even larger than
      * window size. After output surpasses windowSize, we're limited to windowSize offsets again.
index f1e40af2ea053b55597b68a13bc82db27791f031..2c1eee5676abee49459cebf6d40c342c44a16d5a 100644 (file)
@@ -58,7 +58,7 @@ static unsigned ZSTD_useLowProbCount(size_t const nbSeq)
 {
     /* Heuristic: This should cover most blocks <= 16K and
      * start to fade out after 16K to about 32K depending on
-     * comprssibility.
+     * compressibility.
      */
     return nbSeq >= 2048;
 }
@@ -166,7 +166,7 @@ ZSTD_selectEncodingType(
     if (mostFrequent == nbSeq) {
         *repeatMode = FSE_repeat_none;
         if (isDefaultAllowed && nbSeq <= 2) {
-            /* Prefer set_basic over set_rle when there are 2 or less symbols,
+            /* Prefer set_basic over set_rle when there are 2 or fewer symbols,
              * since RLE uses 1 byte, but set_basic uses 5-6 bits per symbol.
              * If basic encoding isn't possible, always choose RLE.
              */
index 5e89a706c0e526a4fccee8b9998c181b083d8685..eed58e7cfca3580f5fa6bbf26d200777014195ef 100644 (file)
@@ -36,7 +36,7 @@
  *      If it is set_compressed, first sub-block's literals section will be Treeless_Literals_Block
  *      and the following sub-blocks' literals sections will be Treeless_Literals_Block.
  *  @return : compressed size of literals section of a sub-block
- *            Or 0 if it unable to compress.
+ *            Or 0 if unable to compress.
  *            Or error code */
 static size_t
 ZSTD_compressSubBlock_literal(const HUF_CElt* hufTable,
index 278995491ec0515f3c1e9163d8c5a4da3b135296..7f97e12a5b2bbd0112af8302e41fac184d926abd 100644 (file)
@@ -951,7 +951,7 @@ void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip) {
     const U32 mls = MIN(ms->cParams.minMatch, 6 /* mls caps out at 6 */);
 
     DEBUGLOG(5, "ZSTD_row_update(), rowLog=%u", rowLog);
-    ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 0 /* dont use cache */);
+    ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 0 /* don't use cache */);
 }
 
 #if defined(ZSTD_ARCH_X86_SSE2)
index 1c04a36f9c7d6ce6746f27438c2e7a8e28b5b8d9..e1d2f7410144bbe0c3ef8d6088f820dec9686823 100644 (file)
@@ -549,7 +549,7 @@ size_t ZSTD_ldm_generateSequences(
          * the window through early invalidation.
          * TODO: * Test the chunk size.
          *       * Try invalidation after the sequence generation and test the
-         *         the offset against maxDist directly.
+         *         offset against maxDist directly.
          *
          * NOTE: Because of dictionaries + sequence splitting we MUST make sure
          * that any offset used is valid at the END of the sequence, since it may
index b0b337e4299740033fb8d2f11e53ee233fc21692..4ac2249bd3e6458293edc53e1008946fc1769a8a 100644 (file)
@@ -1734,7 +1734,7 @@ findSynchronizationPoint(ZSTDMT_CCtx const* mtctx, ZSTD_inBuffer const input)
         }
     } else {
         /* We have enough bytes buffered to initialize the hash,
-         * and are have processed enough bytes to find a sync point.
+         * and have processed enough bytes to find a sync point.
          * Start scanning at the beginning of the input.
          */
         assert(mtctx->inBuff.filled >= RSYNC_MIN_BLOCK_SIZE);
index 8950453f446c490b07f237ef8bf3c48b711e7439..85f4d2202e9f14f6799c1757268caf0fdeeeb182 100644 (file)
@@ -1109,8 +1109,8 @@ size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t sr
 size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; }
 
 /**
- * Similar to ZSTD_nextSrcSizeToDecompress(), but when when a block input can be streamed,
- * we allow taking a partial block as the input. Currently only raw uncompressed blocks can
+ * Similar to ZSTD_nextSrcSizeToDecompress(), but when a block input can be streamed, we
+ * allow taking a partial block as the input. Currently only raw uncompressed blocks can
  * be streamed.
  *
  * For blocks that can be streamed, this allows us to reduce the latency until we produce
@@ -1310,7 +1310,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
 
     default:
         assert(0);   /* impossible */
-        RETURN_ERROR(GENERIC, "impossible to reach");   /* some compiler require default to do something */
+        RETURN_ERROR(GENERIC, "impossible to reach");   /* some compilers require default to do something */
     }
 }
 
@@ -1516,7 +1516,7 @@ unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize)
  *  This could for one of the following reasons :
  *  - The frame does not require a dictionary (most common case).
  *  - The frame was built with dictID intentionally removed.
- *    Needed dictionary is a hidden information.
+ *    Needed dictionary is a hidden piece of information.
  *    Note : this use case also happens when using a non-conformant dictionary.
  *  - `srcSize` is too small, and as a result, frame header could not be decoded.
  *    Note : possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`.
@@ -2170,7 +2170,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
 
         default:
             assert(0);    /* impossible */
-            RETURN_ERROR(GENERIC, "impossible to reach");   /* some compiler require default to do something */
+            RETURN_ERROR(GENERIC, "impossible to reach");   /* some compilers require default to do something */
     }   }
 
     /* result */
index 6f8a75f538f639cc8883367f22220041688ac82b..7c046dab506724c1ce5e4cb0c6daefdef8e031e1 100644 (file)
@@ -90,7 +90,7 @@ static void ZSTD_allocateLiteralsBuffer(ZSTD_DCtx* dctx, void* const dst, const
             dctx->litBufferEnd = dctx->litBuffer + litSize - ZSTD_LITBUFFEREXTRASIZE;
         }
         else {
-            /* initially this will be stored entirely in dst during huffman decoding, it will partially shifted to litExtraBuffer after */
+            /* initially this will be stored entirely in dst during huffman decoding, it will partially be shifted to litExtraBuffer after */
             dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize;
             dctx->litBufferEnd = (BYTE*)dst + expectedWriteSize;
         }
@@ -511,10 +511,10 @@ void ZSTD_buildFSETable_body(ZSTD_seqSymbol* dt,
             }
         }
         /* Now we spread those positions across the table.
-         * The benefit of doing it in two stages is that we avoid the the
+         * The benefit of doing it in two stages is that we avoid the
          * variable size inner loop, which caused lots of branch misses.
          * Now we can run through all the positions without any branch misses.
-         * We unroll the loop twice, since that is what emperically worked best.
+         * We unroll the loop twice, since that is what empirically worked best.
          */
         {
             size_t position = 0;
@@ -1189,7 +1189,7 @@ ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets)
         U32 const ofnbBits = ofDInfo->nbBits;
         /*
          * As gcc has better branch and block analyzers, sometimes it is only
-         * valuable to mark likelyness for clang, it gives around 3-4% of
+         * valuable to mark likeliness for clang, it gives around 3-4% of
          * performance.
          */
 
index 949eb539b51a732faf3c93c9301a4234bfcf1777..724675d304b3071311045c72206c6ada41f98ff5 100644 (file)
@@ -542,7 +542,7 @@ static void COVER_ctx_destroy(COVER_ctx_t *ctx) {
 
 /**
  * Prepare a context for dictionary building.
- * The context is only dependent on the parameter `d` and can used multiple
+ * The context is only dependent on the parameter `d` and can be used multiple
  * times.
  * Returns 0 on success or error code on error.
  * The context must be destroyed with `COVER_ctx_destroy()`.
index 3352859ada47869928873708ac5bb7fce9521698..63a2cee7228d4209d7ef8f73d0cffbd1f90c6c23 100644 (file)
@@ -304,7 +304,7 @@ FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx)
 
 /**
  * Prepare a context for dictionary building.
- * The context is only dependent on the parameter `d` and can used multiple
+ * The context is only dependent on the parameter `d` and can be used multiple
  * times.
  * Returns 0 on success or error code on error.
  * The context must be destroyed with `FASTCOVER_ctx_destroy()`.
index 9e30fd593318edb83c24c8a303b038879b72fefa..46aec798005745569e043fd84afd025b7ac3d982 100644 (file)
@@ -46,7 +46,7 @@ The compiled executable will require ZSTD DLL which is available at `dll\libzstd
 Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a
 dynamic ZSTD library from the `dll` directory. The solution works with Visual C++
 2010 or newer. When one will open the solution with Visual C++ newer than 2010
-then the solution will upgraded to the current version.
+then the solution will be upgraded to the current version.
 
 ## Using ZSTD DLL with Visual C++
 
index 2f473a75734b1750eb9dcba0c56ed62f071fd0eb..6eadd3948b7483f0a25d701aa0a42ecf245a21f6 100644 (file)
@@ -433,7 +433,7 @@ MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BIT_lookBitsFast :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -453,7 +453,7 @@ MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*!BIT_readBitsFast :
-*  unsafe version; only works only if nbBits >= 1 */
+*  unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     size_t value = BIT_lookBitsFast(bitD, nbBits);
index 6625f4df1cb4112fe9efabcc69aeb38cb72565b0..72fc9140d4a069b726f055da859cf59c7effd8f1 100644 (file)
@@ -435,7 +435,7 @@ MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BIT_lookBitsFast :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -455,7 +455,7 @@ MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*!BIT_readBitsFast :
-*  unsafe version; only works only if nbBits >= 1 */
+*  unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     size_t value = BIT_lookBitsFast(bitD, nbBits);
index 8d305c7eae9e5f880e18193debe03a97ad834400..a2d281eb97dad0c3a03aeb810297a6d40f5f11f7 100644 (file)
@@ -700,7 +700,7 @@ MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BIT_lookBitsFast :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -720,7 +720,7 @@ MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
 }
 
 /*!BIT_readBitsFast :
-*  unsafe version; only works only if nbBits >= 1 */
+*  unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
 {
     size_t value = BIT_lookBitsFast(bitD, nbBits);
index fbed0a015317eeb62512301ef53b41167af53493..216c67d01945704ef147dbc9aaf23ffd4459cc0d 100644 (file)
@@ -826,7 +826,7 @@ MEM_STATIC size_t BITv05_lookBits(BITv05_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BITv05_lookBitsFast :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv05_lookBitsFast(BITv05_DStream_t* bitD, U32 nbBits)
 {
     const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -846,7 +846,7 @@ MEM_STATIC size_t BITv05_readBits(BITv05_DStream_t* bitD, unsigned nbBits)
 }
 
 /*!BITv05_readBitsFast :
-*  unsafe version; only works only if nbBits >= 1 */
+*  unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv05_readBitsFast(BITv05_DStream_t* bitD, unsigned nbBits)
 {
     size_t value = BITv05_lookBitsFast(bitD, nbBits);
index c486ed0ac937455ed5d145f01169c4cdf230287c..b224355d437ac9297b818c689e3e5ed957dd190b 100644 (file)
@@ -928,7 +928,7 @@ MEM_STATIC size_t BITv06_initDStream(BITv06_DStream_t* bitD, const void* srcBuff
 }
 
 /*! BITv06_lookBitsFast() :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv06_lookBitsFast(const BITv06_DStream_t* bitD, U32 nbBits)
 {
     U32 const bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -948,7 +948,7 @@ MEM_STATIC size_t BITv06_readBits(BITv06_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BITv06_readBitsFast() :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv06_readBitsFast(BITv06_DStream_t* bitD, U32 nbBits)
 {
     size_t const value = BITv06_lookBitsFast(bitD, nbBits);
index 20d97da5d58fc6ec6cbce237381a7f4ea0672a53..c12a091cb55ee86a2d2c647327e802054f53ffa0 100644 (file)
@@ -596,7 +596,7 @@ MEM_STATIC size_t BITv07_initDStream(BITv07_DStream_t* bitD, const void* srcBuff
 }
 
 /*! BITv07_lookBitsFast() :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv07_lookBitsFast(const BITv07_DStream_t* bitD, U32 nbBits)
 {
     U32 const bitMask = sizeof(bitD->bitContainer)*8 - 1;
@@ -616,7 +616,7 @@ MEM_STATIC size_t BITv07_readBits(BITv07_DStream_t* bitD, U32 nbBits)
 }
 
 /*! BITv07_readBitsFast() :
-*   unsafe version; only works only if nbBits >= 1 */
+*   unsafe version; only works if nbBits >= 1 */
 MEM_STATIC size_t BITv07_readBitsFast(BITv07_DStream_t* bitD, U32 nbBits)
 {
     size_t const value = BITv07_lookBitsFast(bitD, nbBits);
index f1e139a40ddb000f4dcc72f53b64e6a206304f79..8e21ba0f7671b7760186dbef2216698843eca42d 100644 (file)
@@ -110,8 +110,8 @@ extern "C" {
  * The zstd CLI defaults to a 110KB dictionary. You likely don't need a
  * dictionary larger than that. But, most use cases can get away with a
  * smaller dictionary. The advanced dictionary builders can automatically
- * shrink the dictionary for you, and select a the smallest size that
- * doesn't hurt compression ratio too much. See the `shrinkDict` parameter.
+ * shrink the dictionary for you, and select the smallest size that doesn't
+ * hurt compression ratio too much. See the `shrinkDict` parameter.
  * A smaller dictionary can save memory, and potentially speed up
  * compression.
  *
index cea2699b90deec7a93141c2f2259e63cdcc7ab8a..14a78cd931f46002e9539bb833dcef74ea4aa636 100644 (file)
@@ -922,7 +922,7 @@ ZSTDLIB_API unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict);
  *  If @return == 0, the dictID could not be decoded.
  *  This could for one of the following reasons :
  *  - The frame does not require a dictionary to be decoded (most common case).
- *  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden information.
+ *  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information.
  *    Note : this use case also happens when using a non-conformant dictionary.
  *  - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`).
  *  - This is not a Zstandard frame.
@@ -1409,7 +1409,7 @@ ZSTD_generateSequences( ZSTD_CCtx* zc,
 ZSTDLIB_STATIC_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize);
 
 /*! ZSTD_compressSequences() :
- * Compress an array of ZSTD_Sequence, associted with @src buffer, into dst.
+ * Compress an array of ZSTD_Sequence, associated with @src buffer, into dst.
  * @src contains the entire input (not just the literals).
  * If @srcSize > sum(sequence.length), the remaining bytes are considered all literals
  * If a dictionary is included, then the cctx should reference the dict. (see: ZSTD_CCtx_refCDict(), ZSTD_CCtx_loadDictionary(), etc.)
@@ -1904,7 +1904,7 @@ ZSTDLIB_STATIC_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const vo
  * Without validation, providing a sequence that does not conform to the zstd spec will cause
  * undefined behavior, and may produce a corrupted block.
  *
- * With validation enabled, if sequence is invalid (see doc/zstd_compression_format.md for
+ * With validation enabled, if sequence is invalid (see doc/zstd_compression_format.md for
  * specifics regarding offset/matchlength requirements) then the function will bail out and
  * return an error.
  *
@@ -2110,7 +2110,7 @@ ZSTDLIB_STATIC_API size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParamete
  * in the range [dst, dst + pos) MUST not be modified during decompression
  * or you will get data corruption.
  *
- * When this flags is enabled zstd won't allocate an output buffer, because
+ * When this flag is enabled zstd won't allocate an output buffer, because
  * it can write directly to the ZSTD_outBuffer, but it will still allocate
  * an input buffer large enough to fit any compressed block. This will also
  * avoid the memcpy() from the internal output buffer to the ZSTD_outBuffer.
index 590f292eaa6191f276fdde65768d5701048c3289..99d13ac47c1213cca10abb70db496a8b3a6b6201 100644 (file)
@@ -123,7 +123,7 @@ BMK_runTime_t BMK_extract_runTime(BMK_runOutcome_t outcome);
 /* when benchmark failed, it means one invocation of `benchFn` failed.
  * The failure was detected by `errorFn`, operating on return values of `benchFn`.
  * Returns the faulty return value.
- * note : this function will abort() program execution if benchmark did not failed.
+ * note : this function will abort() program execution if benchmark did not fail.
  *        always check if benchmark failed first !
  */
 size_t BMK_extract_errorResult(BMK_runOutcome_t outcome);
index e37921adadc5d8757eaa313fbc8f1c31a6d7d7bf..3c47e3f5b3b447dee327739b52ae52a3d0fdfa7e 100644 (file)
@@ -885,8 +885,8 @@ static void FIO_adjustParamsForPatchFromMode(FIO_prefs_t* const prefs,
     if (cParams.strategy >= ZSTD_btopt) {
         DISPLAYLEVEL(1, "[Optimal parser notes] Consider the following to improve patch size at the cost of speed:\n");
         DISPLAYLEVEL(1, "- Use --single-thread mode in the zstd cli\n");
-        DISPLAYLEVEL(1, "- Set a larger targetLength (eg. --zstd=targetLength=4096)\n");
-        DISPLAYLEVEL(1, "- Set a larger chainLog (eg. --zstd=chainLog=%u)\n", ZSTD_CHAINLOG_MAX);
+        DISPLAYLEVEL(1, "- Set a larger targetLength (e.g. --zstd=targetLength=4096)\n");
+        DISPLAYLEVEL(1, "- Set a larger chainLog (e.g. --zstd=chainLog=%u)\n", ZSTD_CHAINLOG_MAX);
         DISPLAYLEVEL(1, "Also consider playing around with searchLog and hashLog\n");
     }
 }
index 55bcff25afabec75053fdd6757ad4b743d4b4fc5..f53eb03fbec260da6cd3a044a6e1ef167813b40b 100644 (file)
@@ -999,7 +999,7 @@ makeUniqueMirroredDestDirs(char** srcDirNames, unsigned nbFile, const char* outD
                                             trimPath(currDirName)))
             uniqueDirNr++;
 
-        /* we need maintain original src dir name instead of trimmed
+        /* we need to maintain original src dir name instead of trimmed
          * dir, so we can retrieve the original src dir's mode_t */
         uniqueDirNames[uniqueDirNr - 1] = currDirName;
     }
index 0e6e016e950423cf97d6e6a545b3768cb327e4ea..8191e35e70e9973bc144d3a1e6561bd2f5ebae2e 100644 (file)
@@ -210,7 +210,7 @@ If input directory contains "\.\.", the files in this directory will be ignored\
 \fB\-\-no\-progress\fR: do not display the progress bar, but keep all other messages\.
 .
 .IP "\(bu" 4
-\fB\-\-show\-default\-cparams\fR: Shows the default compression parameters that will be used for a particular src file\. If the provided src file is not a regular file (eg\. named pipe), the cli will just output the default parameters\. That is, the parameters that are used when the src size is unknown\.
+\fB\-\-show\-default\-cparams\fR: Shows the default compression parameters that will be used for a particular src file\. If the provided src file is not a regular file (e\.g\. named pipe), the cli will just output the default parameters\. That is, the parameters that are used when the src size is unknown\.
 .
 .IP "\(bu" 4
 \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files
@@ -392,7 +392,7 @@ Note: If \fBwindowLog\fR is set to larger than 27, \fB\-\-long=windowLog\fR or \
 Specify the maximum number of bits for a hash table\.
 .
 .IP
-Bigger hash tables cause less collisions which usually makes compression faster, but requires more memory during compression\.
+Bigger hash tables cause fewer collisions which usually makes compression faster, but requires more memory during compression\.
 .
 .IP
 The minimum \fIhlog\fR is 6 (64 B) and the maximum is 30 (1 GiB)\.
index 569ca1aa0db4b1b576c076da70f20a4b0a115933..10f1bda102fcf6305dce4a28dea1b82bb0c2b53a 100644 (file)
@@ -159,11 +159,11 @@ the last one takes effect.
     Note: `--long` mode will be automatically activated if chainLog < fileLog
         (fileLog being the windowLog required to cover the whole file). You
         can also manually force it.
-       Node: for all levels, you can use --patch-from in --single-thread mode
-               to improve compression ratio at the cost of speed
+        Node: for all levels, you can use --patch-from in --single-thread mode
+        to improve compression ratio at the cost of speed
     Note: for level 19, you can get increased compression ratio at the cost
         of speed by specifying `--zstd=targetLength=` to be something large
-        (i.e 4096), and by setting a large `--zstd=chainLog=`
+        (i.e. 4096), and by setting a large `--zstd=chainLog=`
 * `--rsyncable` :
     `zstd` will periodically synchronize the compression state to make the
     compressed file more rsync-friendly. There is a negligible impact to
@@ -185,7 +185,7 @@ the last one takes effect.
 * `-M#`, `--memory=#`:
     Set a memory usage limit. By default, Zstandard uses 128 MB for decompression
     as the maximum amount of memory the decompressor is allowed to use, but you can
-    override this manually if need be in either direction (ie. you can increase or
+    override this manually if need be in either direction (i.e. you can increase or
     decrease it).
 
     This is also used during compression when using with --patch-from=. In this case,
@@ -275,7 +275,7 @@ the last one takes effect.
 * `--show-default-cparams`:
     Shows the default compression parameters that will be used for a
     particular src file. If the provided src file is not a regular file
-    (eg. named pipe), the cli will just output the default parameters.
+    (e.g. named pipe), the cli will just output the default parameters.
     That is, the parameters that are used when the src size is unknown.
 * `--`:
     All arguments after `--` are treated as files
@@ -493,7 +493,7 @@ The list of available _options_:
 - `hashLog`=_hlog_, `hlog`=_hlog_:
     Specify the maximum number of bits for a hash table.
 
-    Bigger hash tables cause less collisions which usually makes compression
+    Bigger hash tables cause fewer collisions which usually makes compression
     faster, but requires more memory during compression.
 
     The minimum _hlog_ is 6 (64 B) and the maximum is 30 (1 GiB).
index 0b9b82a9859990a66d5a58d328019c1b4b5e41e7..f931b2f384b55786959a3611cebc4055d545d065 100644 (file)
@@ -1423,7 +1423,7 @@ int main(int argCount, const char* argv[])
 
     if (showDefaultCParams) {
         if (operation == zom_decompress) {
-            DISPLAY("error : can't use --show-default-cparams in decomrpession mode \n");
+            DISPLAY("error : can't use --show-default-cparams in decompression mode \n");
             CLEAN_RETURN(1);
         }
     }
index c6ffb4095a73614853542eda06c659b4f5ec19c1..2cf0e76c20e19a98f553cb07daa9722ed6e2d702 100644 (file)
@@ -45,7 +45,7 @@ optional arguments:
   -h, --help            show this help message and exit
   --directory DIRECTORY
                         directory with files to benchmark
-  --levels LEVELS       levels to test eg ('1,2,3')
+  --levels LEVELS       levels to test e.g. ('1,2,3')
   --iterations ITERATIONS
                         number of benchmark iterations to run
   --emails EMAILS       email addresses of people who will be alerted upon
@@ -70,7 +70,7 @@ After `sleepTime` (an optional parameter, default 300 seconds) seconds the scrip
 If a new commit is found it is compiled and a speed benchmark for this commit is performed.
 The results of the speed benchmark are compared to the previous results.
 If compression or decompression speed for one of zstd levels is lower than `lowerLimit` (an optional parameter, default 0.98) the speed benchmark is restarted.
-If second results are also lower than `lowerLimit` the warning e-mail is send to recipients from the list (the `emails` parameter).
+If second results are also lower than `lowerLimit` the warning e-mail is sent to recipients from the list (the `emails` parameter).
 
 Additional remarks:
 - To be sure that speed results are accurate the script should be run on a "stable" target system with no other jobs running in parallel
@@ -168,7 +168,7 @@ Full list of arguments
                     can use all --zstd parameter names and 'cParams' as a shorthand for all parameters used in ZSTD_compressionParameters
                     (Default: display all params available)
  -P#          : generated sample compressibility (when no file is provided)
- -t#          : Caps runtime of operation in seconds (default : 99999 seconds (about 27 hours ))
+ -t#          : Caps runtime of operation in seconds (default: 99999 seconds (about 27 hours))
  -v           : Prints Benchmarking output
  -D           : Next argument dictionary file
  -s           : Benchmark all files separately
index e0c03ec2d4a1e77c2466ef8734c30886d0029826..c98391193663f3e007903f2bdeb858c0809777b5 100644 (file)
@@ -291,7 +291,7 @@ if __name__ == "__main__":
     parser = argparse.ArgumentParser()
 
     parser.add_argument("--directory", help="directory with files to benchmark", default="golden-compression")
-    parser.add_argument("--levels", help="levels to test eg ('1,2,3')", default="1")
+    parser.add_argument("--levels", help="levels to test e.g. ('1,2,3')", default="1")
     parser.add_argument("--iterations", help="number of benchmark iterations to run", default="1")
     parser.add_argument("--emails", help="email addresses of people who will be alerted upon regression. Only for continuous mode", default=None)
     parser.add_argument("--frequency", help="specifies the number of seconds to wait before each successive check for new PRs in continuous mode", default=DEFAULT_MAX_API_CALL_FREQUENCY_SEC)
index 0c56cccb2170f98db77ba16e656eb7479e2c85be..17eac4f6ff4c80b6633105bb410750be5b481db8 100755 (executable)
@@ -636,7 +636,7 @@ def regression(args):
     try:
         description = """
         Runs one or more regression tests.
-        The fuzzer should have been built with with
+        The fuzzer should have been built with
         LIB_FUZZING_ENGINE='libregression.a'.
         Takes input from CORPORA.
         """
index e01daacaa897a0c4b074c8277c92c3cba3736d38..4a09d27fb4745c36da4df5ded2486dbebe41c7c7 100644 (file)
@@ -294,7 +294,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* src, size_t size)
         FUZZ_ASSERT(dictBuffer);
         dictBuffer = generatePseudoRandomString(dictBuffer, dictSize);
     }
-    /* Generate window log first so we dont generate offsets too large */
+    /* Generate window log first so we don't generate offsets too large */
     wLog = FUZZ_dataProducer_uint32Range(producer, ZSTD_WINDOWLOG_MIN, ZSTD_WINDOWLOG_MAX_32);
     cLevel = FUZZ_dataProducer_int32Range(producer, -3, 22);
     mode = (ZSTD_sequenceFormat_e)FUZZ_dataProducer_int32Range(producer, 0, 1);
index 3716d0d0fe11b024ad41963a6a3c30e5f8a48a65..8e6980b3530e482daf779c2ef4495d1999bd9b1e 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 /**
- * This fuzz target attempts to comprss the fuzzed data with the simple
+ * This fuzz target attempts to compress the fuzzed data with the simple
  * compression function with an output buffer that may be too small to
  * ensure that the compressor never crashes.
  */
index 018da622ceac49ca1a6e6d48546628b169101f65..71356d53dbce026bf908ddc31aff61ef4f167c17 100644 (file)
@@ -1063,7 +1063,7 @@ static int basicUnitTests(U32 const seed, double compressibility)
         void* recon = (void*)malloc(size);
 
         size_t refPrefixCompressedSize = 0;
-        size_t refPrefixLdmComrpessedSize = 0;
+        size_t refPrefixLdmCompressedSize = 0;
         size_t reconSize = 0;
 
         ZSTD_CCtx* const cctx = ZSTD_createCCtx();
@@ -1093,20 +1093,20 @@ static int basicUnitTests(U32 const seed, double compressibility)
         /* compress on level 1 using refPrefix and ldm */
         ZSTD_CCtx_refPrefix(cctx, dict, size);;
         CHECK_Z(ZSTD_CCtx_setParameter(cctx, ZSTD_c_enableLongDistanceMatching, 1))
-        refPrefixLdmComrpessedSize = ZSTD_compress2(cctx, dst, dstSize, src, size);
-        assert(!ZSTD_isError(refPrefixLdmComrpessedSize));
+        refPrefixLdmCompressedSize = ZSTD_compress2(cctx, dst, dstSize, src, size);
+        assert(!ZSTD_isError(refPrefixLdmCompressedSize));
 
         /* test round trip refPrefix + ldm*/
         ZSTD_DCtx_refPrefix(dctx, dict, size);
-        reconSize = ZSTD_decompressDCtx(dctx, recon, size, dst, refPrefixLdmComrpessedSize);
+        reconSize = ZSTD_decompressDCtx(dctx, recon, size, dst, refPrefixLdmCompressedSize);
         assert(!ZSTD_isError(reconSize));
         assert(reconSize == size);
         assert(!memcmp(recon, src, size));
 
         /* make sure that refPrefixCompressedSize is significantly greater */
-        assert(refPrefixCompressedSize > 10 * refPrefixLdmComrpessedSize);
-        /* make sure the ldm comrpessed size is less than 1% of original */
-        assert((double)refPrefixLdmComrpessedSize / (double)size < 0.01);
+        assert(refPrefixCompressedSize > 10 * refPrefixLdmCompressedSize);
+        /* make sure the ldm compressed size is less than 1% of original */
+        assert((double)refPrefixLdmCompressedSize / (double)size < 0.01);
 
         ZSTD_freeDCtx(dctx);
         ZSTD_freeCCtx(cctx);
index 033a10181a3d5201f705c8109a33881ffcc56d89..756a4334059eba3d1f8d4828a8d03d5471c8a945 100644 (file)
@@ -555,7 +555,7 @@ static int feasible(const BMK_benchResult_t results, const constraint_t target)
 }
 
 /* hill climbing value for part 1 */
-/* Scoring here is a linear reward for all set constraints normalized between 0 to 1
+/* Scoring here is a linear reward for all set constraints normalized between 0 and 1
  * (with 0 at 0 and 1 being fully fulfilling the constraint), summed with a logarithmic
  * bonus to exceeding the constraint value. We also give linear ratio for compression ratio.
  * The constant factors are experimental.
index e61767c468fb5fc637b039d38d5e8130352b8c08..f1cc88c52f26e82343da94b194a2fc84e4e8ad88 100644 (file)
@@ -43,7 +43,7 @@ This behavior can be changed using `ZWRAP_setDecompressionType(ZWRAP_FORCE_ZLIB)
 
 
 #### Example
-We have take the file `test/example.c` from [the zlib library distribution](http://zlib.net/) and copied it to [zlibWrapper/examples/example.c](examples/example.c).
+We have taken the file `test/example.c` from [the zlib library distribution](http://zlib.net/) and copied it to [zlibWrapper/examples/example.c](examples/example.c).
 After compilation and execution it shows the following results: 
 ```
 zlib version 1.2.8 = 0x1280, compile flags = 0x65