Skip to content

Commit c1e588f

Browse files
authored
Merge pull request #3771 from DimitriPapadopoulos/codespell
Fix new typos found by codespell
2 parents 0e2cfeb + fe34776 commit c1e588f

13 files changed

+49
-49
lines changed

build/cmake/lib/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ option(ZSTD_BUILD_DECOMPRESSION "BUILD DECOMPRESSION MODULE" ON)
1717
option(ZSTD_BUILD_DICTBUILDER "BUILD DICTBUILDER MODULE" ON)
1818
option(ZSTD_BUILD_DEPRECATED "BUILD DEPRECATED MODULE" OFF)
1919

20-
set(ZSTDLIB_VISIBLE "" CACHE STRING "Visiblity for ZSTDLIB API")
21-
set(ZSTDERRORLIB_VISIBLE "" CACHE STRING "Visiblity for ZSTDERRORLIB_VISIBLE API")
22-
set(ZDICTLIB_VISIBLE "" CACHE STRING "Visiblity for ZDICTLIB_VISIBLE API")
23-
set(ZSTDLIB_STATIC_API "" CACHE STRING "Visiblity for ZSTDLIB_STATIC_API API")
24-
set(ZDICTLIB_STATIC_API "" CACHE STRING "Visiblity for ZDICTLIB_STATIC_API API")
20+
set(ZSTDLIB_VISIBLE "" CACHE STRING "Visibility for ZSTDLIB API")
21+
set(ZSTDERRORLIB_VISIBLE "" CACHE STRING "Visibility for ZSTDERRORLIB_VISIBLE API")
22+
set(ZDICTLIB_VISIBLE "" CACHE STRING "Visibility for ZDICTLIB_VISIBLE API")
23+
set(ZSTDLIB_STATIC_API "" CACHE STRING "Visibility for ZSTDLIB_STATIC_API API")
24+
set(ZDICTLIB_STATIC_API "" CACHE STRING "Visibility for ZDICTLIB_STATIC_API API")
2525

2626
set_property(CACHE ZSTDLIB_VISIBLE PROPERTY STRINGS "" "hidden" "default" "protected" "internal")
2727
set_property(CACHE ZSTDERRORLIB_VISIBLE PROPERTY STRINGS "" "hidden" "default" "protected" "internal")

doc/educational_decoder/zstd_decompress.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ static void decode_seq_table(FSE_dtable *const table, istream_t *const in,
12131213
break;
12141214
}
12151215
case seq_repeat:
1216-
// "Repeat_Mode : re-use distribution table from previous compressed
1216+
// "Repeat_Mode : reuse distribution table from previous compressed
12171217
// block."
12181218
// Nothing to do here, table will be unchanged
12191219
if (!table->symbols) {

doc/zstd_manual.html

+11-11
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h3>Helper functions</h3><pre></pre><b><pre></b>/* ZSTD_compressBound() :<b>
174174

175175
<h3>Compression context</h3><pre> When compressing many times,
176176
it is recommended to allocate a context just once,
177-
and re-use it for each successive compression operation.
177+
and reuse it for each successive compression operation.
178178
This will make workload friendlier for system's memory.
179179
Note : re-using context is just a speed / resource optimization.
180180
It doesn't change the compression ratio, which remains identical.
@@ -200,7 +200,7 @@ <h3>Compression context</h3><pre> When compressing many times,
200200

201201
<h3>Decompression context</h3><pre> When decompressing many times,
202202
it is recommended to allocate a context only once,
203-
and re-use it for each successive compression operation.
203+
and reuse it for each successive compression operation.
204204
This will make workload friendlier for system's memory.
205205
Use one context per thread for parallel execution.
206206
</pre><b><pre>typedef struct ZSTD_DCtx_s ZSTD_DCtx;
@@ -568,14 +568,14 @@ <h3>Decompression context</h3><pre> When decompressing many times,
568568
A ZSTD_CStream object is required to track streaming operation.
569569
Use ZSTD_createCStream() and ZSTD_freeCStream() to create/release resources.
570570
ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
571-
It is recommended to re-use ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
571+
It is recommended to reuse ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
572572

573573
For parallel execution, use one separate ZSTD_CStream per thread.
574574

575575
note : since v1.3.0, ZSTD_CStream and ZSTD_CCtx are the same thing.
576576

577577
Parameters are sticky : when starting a new compression on the same context,
578-
it will re-use the same sticky parameters as previous compression session.
578+
it will reuse the same sticky parameters as previous compression session.
579579
When in doubt, it's recommended to fully initialize the context before usage.
580580
Use ZSTD_CCtx_reset() to reset the context and ZSTD_CCtx_setParameter(),
581581
ZSTD_CCtx_setPledgedSrcSize(), or ZSTD_CCtx_loadDictionary() and friends to
@@ -698,7 +698,7 @@ <h3>Streaming compression functions</h3><pre></pre><b><pre>typedef enum {
698698
<a name="Chapter9"></a><h2>Streaming decompression - HowTo</h2><pre>
699699
A ZSTD_DStream object is required to track streaming operations.
700700
Use ZSTD_createDStream() and ZSTD_freeDStream() to create/release resources.
701-
ZSTD_DStream objects can be re-used multiple times.
701+
ZSTD_DStream objects can be reused multiple times.
702702

703703
Use ZSTD_initDStream() to start a new decompression operation.
704704
@return : recommended first input size
@@ -869,7 +869,7 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
869869
<a name="Chapter13"></a><h2>Advanced dictionary and prefix API (Requires v1.4.0+)</h2><pre>
870870
This API allows dictionaries to be used with ZSTD_compress2(),
871871
ZSTD_compressStream2(), and ZSTD_decompressDCtx().
872-
Dictionaries are sticky, they remain valid when same context is re-used,
872+
Dictionaries are sticky, they remain valid when same context is reused,
873873
they only reset when the context is reset
874874
with ZSTD_reset_parameters or ZSTD_reset_session_and_parameters.
875875
In contrast, Prefixes are single-use.
@@ -1857,7 +1857,7 @@ <h3>Advanced Streaming compression functions</h3><pre></pre><b><pre></pre></b><B
18571857
explicitly specified.
18581858

18591859
start a new frame, using same parameters from previous frame.
1860-
This is typically useful to skip dictionary loading stage, since it will re-use it in-place.
1860+
This is typically useful to skip dictionary loading stage, since it will reuse it in-place.
18611861
Note that zcs must be init at least once before using ZSTD_resetCStream().
18621862
If pledgedSrcSize is not known at reset time, use macro ZSTD_CONTENTSIZE_UNKNOWN.
18631863
If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end.
@@ -1918,7 +1918,7 @@ <h3>Advanced Streaming decompression functions</h3><pre></pre><b><pre></pre></b>
19181918
</b><p>
19191919
ZSTD_DCtx_reset(zds, ZSTD_reset_session_only);
19201920

1921-
re-use decompression parameters from previous init; saves dictionary loading
1921+
reuse decompression parameters from previous init; saves dictionary loading
19221922

19231923
</p></pre><BR>
19241924

@@ -1964,7 +1964,7 @@ <h3>Advanced Streaming decompression functions</h3><pre></pre><b><pre></pre></b>
19641964
<a name="Chapter21"></a><h2>Buffer-less streaming compression (synchronous mode)</h2><pre>
19651965
A ZSTD_CCtx object is required to track streaming operations.
19661966
Use ZSTD_createCCtx() / ZSTD_freeCCtx() to manage resource.
1967-
ZSTD_CCtx object can be re-used multiple times within successive compression operations.
1967+
ZSTD_CCtx object can be reused multiple times within successive compression operations.
19681968

19691969
Start by initializing a context.
19701970
Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
@@ -1985,7 +1985,7 @@ <h3>Advanced Streaming decompression functions</h3><pre></pre><b><pre></pre></b>
19851985
It's possible to use srcSize==0, in which case, it will write a final empty block to end the frame.
19861986
Without last block mark, frames are considered unfinished (hence corrupted) by compliant decoders.
19871987

1988-
`ZSTD_CCtx` object can be re-used (ZSTD_compressBegin()) to compress again.
1988+
`ZSTD_CCtx` object can be reused (ZSTD_compressBegin()) to compress again.
19891989
<BR></pre>
19901990

19911991
<h3>Buffer-less streaming compression functions</h3><pre></pre><b><pre>ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
@@ -2002,7 +2002,7 @@ <h3>Buffer-less streaming compression functions</h3><pre></pre><b><pre>ZSTD_DEPR
20022002
<a name="Chapter22"></a><h2>Buffer-less streaming decompression (synchronous mode)</h2><pre>
20032003
A ZSTD_DCtx object is required to track streaming operations.
20042004
Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
2005-
A ZSTD_DCtx object can be re-used multiple times.
2005+
A ZSTD_DCtx object can be reused multiple times.
20062006

20072007
First typical operation is to retrieve frame parameters, using ZSTD_getFrameHeader().
20082008
Frame header is extracted from the beginning of compressed frame, so providing only the frame's beginning is enough.

lib/common/pool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void POOL_joinJobs(POOL_ctx* ctx);
4747
/*! POOL_resize() :
4848
* Expands or shrinks pool's number of threads.
4949
* This is more efficient than releasing + creating a new context,
50-
* since it tries to preserve and re-use existing threads.
50+
* since it tries to preserve and reuse existing threads.
5151
* `numThreads` must be at least 1.
5252
* @return : 0 when resize was successful,
5353
* !0 (typically 1) if there is an error.

lib/compress/huf_compress.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ size_t HUF_compress1X_repeat (void* dst, size_t dstSize,
14471447
/* HUF_compress4X_repeat():
14481448
* compress input using 4 streams.
14491449
* consider skipping quickly
1450-
* re-use an existing huffman compression table */
1450+
* reuse an existing huffman compression table */
14511451
size_t HUF_compress4X_repeat (void* dst, size_t dstSize,
14521452
const void* src, size_t srcSize,
14531453
unsigned maxSymbolValue, unsigned huffLog,

lib/compress/zstd_compress.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,7 @@ ZSTD_reduceTable_internal (U32* const table, U32 const size, U32 const reducerVa
26062606
assert(size < (1U<<31)); /* can be casted to int */
26072607

26082608
#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE)
2609-
/* To validate that the table re-use logic is sound, and that we don't
2609+
/* To validate that the table reuse logic is sound, and that we don't
26102610
* access table space that we haven't cleaned, we re-"poison" the table
26112611
* space every time we mark it dirty.
26122612
*

lib/compress/zstd_compress_internal.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern "C" {
3939
It's not a big deal though : candidate will just be sorted again.
4040
Additionally, candidate position 1 will be lost.
4141
But candidate 1 cannot hide a large tree of candidates, so it's a minimal loss.
42-
The benefit is that ZSTD_DUBT_UNSORTED_MARK cannot be mishandled after table re-use with a different strategy.
42+
The benefit is that ZSTD_DUBT_UNSORTED_MARK cannot be mishandled after table reuse with a different strategy.
4343
This constant is required by ZSTD_compressBlock_btlazy2() and ZSTD_reduceTable_internal() */
4444

4545

@@ -228,7 +228,7 @@ struct ZSTD_matchState_t {
228228
U32 rowHashLog; /* For row-based matchfinder: Hashlog based on nb of rows in the hashTable.*/
229229
BYTE* tagTable; /* For row-based matchFinder: A row-based table containing the hashes and head index. */
230230
U32 hashCache[ZSTD_ROW_HASH_CACHE_SIZE]; /* For row-based matchFinder: a cache of hashes to improve speed */
231-
U64 hashSalt; /* For row-based matchFinder: salts the hash for re-use of tag table */
231+
U64 hashSalt; /* For row-based matchFinder: salts the hash for reuse of tag table */
232232
U32 hashSaltEntropy; /* For row-based matchFinder: collects entropy for salt generation */
233233

234234
U32* hashTable;

lib/compress/zstd_cwksp.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ MEM_STATIC void* ZSTD_cwksp_reserve_aligned(ZSTD_cwksp* ws, size_t bytes)
434434

435435
/**
436436
* Aligned on 64 bytes. These buffers have the special property that
437-
* their values remain constrained, allowing us to re-use them without
437+
* their values remain constrained, allowing us to reuse them without
438438
* memset()-ing them.
439439
*/
440440
MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes)
@@ -526,7 +526,7 @@ MEM_STATIC void ZSTD_cwksp_mark_tables_dirty(ZSTD_cwksp* ws)
526526
DEBUGLOG(4, "cwksp: ZSTD_cwksp_mark_tables_dirty");
527527

528528
#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE)
529-
/* To validate that the table re-use logic is sound, and that we don't
529+
/* To validate that the table reuse logic is sound, and that we don't
530530
* access table space that we haven't cleaned, we re-"poison" the table
531531
* space every time we mark it dirty.
532532
* Since tableValidEnd space and initOnce space may overlap we don't poison
@@ -603,9 +603,9 @@ MEM_STATIC void ZSTD_cwksp_clear(ZSTD_cwksp* ws) {
603603
DEBUGLOG(4, "cwksp: clearing!");
604604

605605
#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE)
606-
/* To validate that the context re-use logic is sound, and that we don't
606+
/* To validate that the context reuse logic is sound, and that we don't
607607
* access stuff that this compression hasn't initialized, we re-"poison"
608-
* the workspace except for the areas in which we expect memory re-use
608+
* the workspace except for the areas in which we expect memory reuse
609609
* without initialization (objects, valid tables area and init once
610610
* memory). */
611611
{

lib/decompress/zstd_decompress_block.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx,
14351435
BIT_DStream_completed < BIT_DStream_overflow);
14361436

14371437
/* decompress without overrunning litPtr begins */
1438-
{ seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one interation) */
1438+
{ seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one iteration) */
14391439
/* Align the decompression loop to 32 + 16 bytes.
14401440
*
14411441
* zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression
@@ -1595,7 +1595,7 @@ ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx,
15951595
litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE;
15961596
dctx->litBufferLocation = ZSTD_not_in_dst;
15971597
}
1598-
/* copy last literals from interal buffer */
1598+
/* copy last literals from internal buffer */
15991599
{ size_t const lastLLSize = litBufferEnd - litPtr;
16001600
RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, "");
16011601
if (op != NULL) {

lib/zstd.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ ZSTDLIB_API int ZSTD_defaultCLevel(void); /*!< default compres
249249
/*= Compression context
250250
* When compressing many times,
251251
* it is recommended to allocate a context just once,
252-
* and re-use it for each successive compression operation.
252+
* and reuse it for each successive compression operation.
253253
* This will make workload friendlier for system's memory.
254254
* Note : re-using context is just a speed / resource optimization.
255255
* It doesn't change the compression ratio, which remains identical.
@@ -276,7 +276,7 @@ ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
276276
/*= Decompression context
277277
* When decompressing many times,
278278
* it is recommended to allocate a context only once,
279-
* and re-use it for each successive compression operation.
279+
* and reuse it for each successive compression operation.
280280
* This will make workload friendlier for system's memory.
281281
* Use one context per thread for parallel execution. */
282282
typedef struct ZSTD_DCtx_s ZSTD_DCtx;
@@ -682,14 +682,14 @@ typedef struct ZSTD_outBuffer_s {
682682
* A ZSTD_CStream object is required to track streaming operation.
683683
* Use ZSTD_createCStream() and ZSTD_freeCStream() to create/release resources.
684684
* ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
685-
* It is recommended to re-use ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
685+
* It is recommended to reuse ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
686686
*
687687
* For parallel execution, use one separate ZSTD_CStream per thread.
688688
*
689689
* note : since v1.3.0, ZSTD_CStream and ZSTD_CCtx are the same thing.
690690
*
691691
* Parameters are sticky : when starting a new compression on the same context,
692-
* it will re-use the same sticky parameters as previous compression session.
692+
* it will reuse the same sticky parameters as previous compression session.
693693
* When in doubt, it's recommended to fully initialize the context before usage.
694694
* Use ZSTD_CCtx_reset() to reset the context and ZSTD_CCtx_setParameter(),
695695
* ZSTD_CCtx_setPledgedSrcSize(), or ZSTD_CCtx_loadDictionary() and friends to
@@ -837,7 +837,7 @@ ZSTDLIB_API size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
837837
*
838838
* A ZSTD_DStream object is required to track streaming operations.
839839
* Use ZSTD_createDStream() and ZSTD_freeDStream() to create/release resources.
840-
* ZSTD_DStream objects can be re-used multiple times.
840+
* ZSTD_DStream objects can be reused multiple times.
841841
*
842842
* Use ZSTD_initDStream() to start a new decompression operation.
843843
* @return : recommended first input size
@@ -1023,7 +1023,7 @@ ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
10231023
*
10241024
* This API allows dictionaries to be used with ZSTD_compress2(),
10251025
* ZSTD_compressStream2(), and ZSTD_decompressDCtx().
1026-
* Dictionaries are sticky, they remain valid when same context is re-used,
1026+
* Dictionaries are sticky, they remain valid when same context is reused,
10271027
* they only reset when the context is reset
10281028
* with ZSTD_reset_parameters or ZSTD_reset_session_and_parameters.
10291029
* In contrast, Prefixes are single-use.
@@ -2581,7 +2581,7 @@ size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
25812581
* explicitly specified.
25822582
*
25832583
* start a new frame, using same parameters from previous frame.
2584-
* This is typically useful to skip dictionary loading stage, since it will re-use it in-place.
2584+
* This is typically useful to skip dictionary loading stage, since it will reuse it in-place.
25852585
* Note that zcs must be init at least once before using ZSTD_resetCStream().
25862586
* If pledgedSrcSize is not known at reset time, use macro ZSTD_CONTENTSIZE_UNKNOWN.
25872587
* If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end.
@@ -2657,7 +2657,7 @@ ZSTDLIB_STATIC_API size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const Z
26572657
*
26582658
* ZSTD_DCtx_reset(zds, ZSTD_reset_session_only);
26592659
*
2660-
* re-use decompression parameters from previous init; saves dictionary loading
2660+
* reuse decompression parameters from previous init; saves dictionary loading
26612661
*/
26622662
ZSTD_DEPRECATED("use ZSTD_DCtx_reset, see zstd.h for detailed instructions")
26632663
ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds);
@@ -2844,7 +2844,7 @@ ZSTD_registerSequenceProducer(
28442844
28452845
A ZSTD_CCtx object is required to track streaming operations.
28462846
Use ZSTD_createCCtx() / ZSTD_freeCCtx() to manage resource.
2847-
ZSTD_CCtx object can be re-used multiple times within successive compression operations.
2847+
ZSTD_CCtx object can be reused multiple times within successive compression operations.
28482848
28492849
Start by initializing a context.
28502850
Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
@@ -2865,7 +2865,7 @@ ZSTD_registerSequenceProducer(
28652865
It's possible to use srcSize==0, in which case, it will write a final empty block to end the frame.
28662866
Without last block mark, frames are considered unfinished (hence corrupted) by compliant decoders.
28672867
2868-
`ZSTD_CCtx` object can be re-used (ZSTD_compressBegin()) to compress again.
2868+
`ZSTD_CCtx` object can be reused (ZSTD_compressBegin()) to compress again.
28692869
*/
28702870

28712871
/*===== Buffer-less streaming compression functions =====*/
@@ -2897,7 +2897,7 @@ size_t ZSTD_compressBegin_usingCDict_advanced(ZSTD_CCtx* const cctx, const ZSTD_
28972897
28982898
A ZSTD_DCtx object is required to track streaming operations.
28992899
Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
2900-
A ZSTD_DCtx object can be re-used multiple times.
2900+
A ZSTD_DCtx object can be reused multiple times.
29012901
29022902
First typical operation is to retrieve frame parameters, using ZSTD_getFrameHeader().
29032903
Frame header is extracted from the beginning of compressed frame, so providing only the frame's beginning is enough.

0 commit comments

Comments
 (0)