Skip to content

Commit 3868468

Browse files
authored
Fix typos (#986)
1 parent 8b81499 commit 3868468

File tree

17 files changed

+70
-70
lines changed

17 files changed

+70
-70
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/comp
8181
* zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795
8282
* s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779
8383
* s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780
84-
* gzhttp: Suppport ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799
84+
* gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799
8585

8686
* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
8787
* zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776
@@ -136,7 +136,7 @@ https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/comp
136136
* zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/[email protected]/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649
137137
* Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651
138138
* flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656
139-
* zstd: Improve "better" compresssion https://github.com/klauspost/compress/pull/657
139+
* zstd: Improve "better" compression https://github.com/klauspost/compress/pull/657
140140
* s2: Improve "best" compression https://github.com/klauspost/compress/pull/658
141141
* s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635
142142
* s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646
@@ -339,7 +339,7 @@ While the release has been extensively tested, it is recommended to testing when
339339
* s2: Fix binaries.
340340

341341
* Feb 25, 2021 (v1.11.8)
342-
* s2: Fixed occational out-of-bounds write on amd64. Upgrade recommended.
342+
* s2: Fixed occasional out-of-bounds write on amd64. Upgrade recommended.
343343
* s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315)
344344
* s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322)
345345
* zstd: Faster "compression" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314)
@@ -518,7 +518,7 @@ While the release has been extensively tested, it is recommended to testing when
518518
* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster.
519519
* Feb 19, 2016: Handle small payloads faster in level 1-3.
520520
* Feb 19, 2016: Added faster level 2 + 3 compression modes.
521-
* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progresssion in terms of compression. New default level is 5.
521+
* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progression in terms of compression. New default level is 5.
522522
* Feb 14, 2016: Snappy: Merge upstream changes.
523523
* Feb 14, 2016: Snappy: Fix aggressive skipping.
524524
* Feb 14, 2016: Snappy: Update benchmark.

compressible_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
func BenchmarkEstimate(b *testing.B) {
1010
b.ReportAllocs()
11-
// (predictable, low entropy distibution)
11+
// (predictable, low entropy distribution)
1212
b.Run("zeroes-5k", func(b *testing.B) {
1313
var testData = make([]byte, 5000)
1414
b.SetBytes(int64(len(testData)))
@@ -19,7 +19,7 @@ func BenchmarkEstimate(b *testing.B) {
1919
b.Log(Estimate(testData))
2020
})
2121

22-
// (predictable, high entropy distibution)
22+
// (predictable, high entropy distribution)
2323
b.Run("predictable-5k", func(b *testing.B) {
2424
var testData = make([]byte, 5000)
2525
for i := range testData {
@@ -33,7 +33,7 @@ func BenchmarkEstimate(b *testing.B) {
3333
b.Log(Estimate(testData))
3434
})
3535

36-
// (not predictable, high entropy distibution)
36+
// (not predictable, high entropy distribution)
3737
b.Run("random-500b", func(b *testing.B) {
3838
var testData = make([]byte, 500)
3939
rand.Read(testData)
@@ -45,7 +45,7 @@ func BenchmarkEstimate(b *testing.B) {
4545
b.Log(Estimate(testData))
4646
})
4747

48-
// (not predictable, high entropy distibution)
48+
// (not predictable, high entropy distribution)
4949
b.Run("random-5k", func(b *testing.B) {
5050
var testData = make([]byte, 5000)
5151
rand.Read(testData)
@@ -57,7 +57,7 @@ func BenchmarkEstimate(b *testing.B) {
5757
b.Log(Estimate(testData))
5858
})
5959

60-
// (not predictable, high entropy distibution)
60+
// (not predictable, high entropy distribution)
6161
b.Run("random-50k", func(b *testing.B) {
6262
var testData = make([]byte, 50000)
6363
rand.Read(testData)
@@ -69,7 +69,7 @@ func BenchmarkEstimate(b *testing.B) {
6969
b.Log(Estimate(testData))
7070
})
7171

72-
// (not predictable, high entropy distibution)
72+
// (not predictable, high entropy distribution)
7373
b.Run("random-500k", func(b *testing.B) {
7474
var testData = make([]byte, 500000)
7575
rand.Read(testData)
@@ -81,7 +81,7 @@ func BenchmarkEstimate(b *testing.B) {
8181
b.Log(Estimate(testData))
8282
})
8383

84-
// (not predictable, medium entropy distibution)
84+
// (not predictable, medium entropy distribution)
8585
b.Run("base-32-5k", func(b *testing.B) {
8686
var testData = make([]byte, 5000)
8787
rand.Read(testData)
@@ -95,7 +95,7 @@ func BenchmarkEstimate(b *testing.B) {
9595
}
9696
b.Log(Estimate(testData))
9797
})
98-
// (medium predictable, medium entropy distibution)
98+
// (medium predictable, medium entropy distribution)
9999
b.Run("text", func(b *testing.B) {
100100
var testData = []byte(`If compression is done per-chunk, care should be taken that it doesn't leave restic backups open to watermarking/fingerprinting attacks.
101101
This is essentially the same problem we discussed related to fingerprinting the CDC deduplication process:
@@ -122,7 +122,7 @@ Thoughts?`)
122122

123123
func BenchmarkSnannonEntropyBits(b *testing.B) {
124124
b.ReportAllocs()
125-
// (predictable, low entropy distibution)
125+
// (predictable, low entropy distribution)
126126
b.Run("zeroes-5k", func(b *testing.B) {
127127
var testData = make([]byte, 5000)
128128
b.SetBytes(int64(len(testData)))
@@ -133,7 +133,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
133133
b.Log(ShannonEntropyBits(testData))
134134
})
135135

136-
// (predictable, high entropy distibution)
136+
// (predictable, high entropy distribution)
137137
b.Run("predictable-5k", func(b *testing.B) {
138138
var testData = make([]byte, 5000)
139139
for i := range testData {
@@ -147,7 +147,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
147147
b.Log(ShannonEntropyBits(testData))
148148
})
149149

150-
// (not predictable, high entropy distibution)
150+
// (not predictable, high entropy distribution)
151151
b.Run("random-500b", func(b *testing.B) {
152152
var testData = make([]byte, 500)
153153
rand.Read(testData)
@@ -159,7 +159,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
159159
b.Log(ShannonEntropyBits(testData))
160160
})
161161

162-
// (not predictable, high entropy distibution)
162+
// (not predictable, high entropy distribution)
163163
b.Run("random-5k", func(b *testing.B) {
164164
var testData = make([]byte, 5000)
165165
rand.Read(testData)
@@ -171,7 +171,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
171171
b.Log(ShannonEntropyBits(testData))
172172
})
173173

174-
// (not predictable, high entropy distibution)
174+
// (not predictable, high entropy distribution)
175175
b.Run("random-50k", func(b *testing.B) {
176176
var testData = make([]byte, 50000)
177177
rand.Read(testData)
@@ -183,7 +183,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
183183
b.Log(ShannonEntropyBits(testData))
184184
})
185185

186-
// (not predictable, high entropy distibution)
186+
// (not predictable, high entropy distribution)
187187
b.Run("random-500k", func(b *testing.B) {
188188
var testData = make([]byte, 500000)
189189
rand.Read(testData)
@@ -195,7 +195,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
195195
b.Log(ShannonEntropyBits(testData))
196196
})
197197

198-
// (not predictable, medium entropy distibution)
198+
// (not predictable, medium entropy distribution)
199199
b.Run("base-32-5k", func(b *testing.B) {
200200
var testData = make([]byte, 5000)
201201
rand.Read(testData)
@@ -209,7 +209,7 @@ func BenchmarkSnannonEntropyBits(b *testing.B) {
209209
}
210210
b.Log(ShannonEntropyBits(testData))
211211
})
212-
// (medium predictable, medium entropy distibution)
212+
// (medium predictable, medium entropy distribution)
213213
b.Run("text", func(b *testing.B) {
214214
var testData = []byte(`If compression is done per-chunk, care should be taken that it doesn't leave restic backups open to watermarking/fingerprinting attacks.
215215
This is essentially the same problem we discussed related to fingerprinting the CDC deduplication process:

flate/deflate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ func (d *compressor) reset(w io.Writer) {
861861
}
862862
switch d.compressionLevel.chain {
863863
case 0:
864-
// level was NoCompression or ConstantCompresssion.
864+
// level was NoCompression or ConstantCompression.
865865
d.windowEnd = 0
866866
default:
867867
s := d.state

fse/decompress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
// It is possible, but by no way guaranteed that corrupt data will
1616
// return an error.
1717
// It is up to the caller to verify integrity of the returned data.
18-
// Use a predefined Scrach to set maximum acceptable output size.
18+
// Use a predefined Scratch to set maximum acceptable output size.
1919
func Decompress(b []byte, s *Scratch) ([]byte, error) {
2020
s, err := s.prepare(b)
2121
if err != nil {

gzhttp/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func TestTransportInvalid(t *testing.T) {
127127
server := httptest.NewServer(newTestHandler(bin))
128128

129129
c := http.Client{Transport: Transport(http.DefaultTransport)}
130-
// Serves json as gzippped...
130+
// Serves json as gzipped...
131131
resp, err := c.Get(server.URL + "/gzipped")
132132
if err != nil {
133133
t.Fatal(err)

huff0/decompress.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ func (s *Scratch) matches(ct cTable, w io.Writer) {
11361136
errs++
11371137
}
11381138
if errs > 0 {
1139-
fmt.Fprintf(w, "%d errros in base, stopping\n", errs)
1139+
fmt.Fprintf(w, "%d errors in base, stopping\n", errs)
11401140
continue
11411141
}
11421142
// Ensure that all combinations are covered.
@@ -1152,7 +1152,7 @@ func (s *Scratch) matches(ct cTable, w io.Writer) {
11521152
errs++
11531153
}
11541154
if errs > 20 {
1155-
fmt.Fprintf(w, "%d errros, stopping\n", errs)
1155+
fmt.Fprintf(w, "%d errors, stopping\n", errs)
11561156
break
11571157
}
11581158
}

s2/_generate/gen.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ func (o options) emitLiteral(name string, litLen, retval, dstBase, litBase reg.G
19201920
return
19211921
}
19221922

1923-
// genEmitRepeat generates a standlone emitRepeat.
1923+
// genEmitRepeat generates a standalone emitRepeat.
19241924
func (o options) genEmitRepeat() {
19251925
TEXT("emitRepeat", NOSPLIT, "func(dst []byte, offset, length int) int")
19261926
Doc("emitRepeat writes a repeat chunk and returns the number of bytes written.",
@@ -2088,7 +2088,7 @@ func (o options) emitRepeat(name string, length reg.GPVirtual, offset reg.GPVirt
20882088
// 1 <= offset && offset <= math.MaxUint32
20892089
// 4 <= length && length <= 1 << 24
20902090

2091-
// genEmitCopy generates a standlone emitCopy
2091+
// genEmitCopy generates a standalone emitCopy
20922092
func (o options) genEmitCopy() {
20932093
TEXT("emitCopy", NOSPLIT, "func(dst []byte, offset, length int) int")
20942094
Doc("emitCopy writes a copy chunk and returns the number of bytes written.", "",
@@ -2118,7 +2118,7 @@ func (o options) genEmitCopy() {
21182118
// 1 <= offset && offset <= math.MaxUint32
21192119
// 4 <= length && length <= 1 << 24
21202120

2121-
// genEmitCopy generates a standlone emitCopy
2121+
// genEmitCopy generates a standalone emitCopy
21222122
func (o options) genEmitCopyNoRepeat() {
21232123
TEXT("emitCopyNoRepeat", NOSPLIT, "func(dst []byte, offset, length int) int")
21242124
Doc("emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.", "",

s2/cmd/internal/readahead/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ func (a *seekable) Seek(offset int64, whence int) (res int64, err error) {
411411
}
412412
//Seek the actual Seeker
413413
if res, err = seeker.Seek(offset, whence); err == nil {
414-
//If the seek was successful, reinitalize ourselves (with the new position).
414+
//If the seek was successful, reinitialize ourselves (with the new position).
415415
a.initBuffers(a.in, a.bufs, a.size)
416416
}
417417
return

s2/cmd/s2c/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Options:`)
247247
fmt.Printf(" %d -> %d [%.02f%%]; %v, %.01fMB/s", len(compressed), len(decomp), pct, ms, mbpersec)
248248
}
249249
if !bytes.Equal(decomp, b) {
250-
exitErr(fmt.Errorf("decompresed data mismatch"))
250+
exitErr(fmt.Errorf("decompressed data mismatch"))
251251
}
252252
if !*quiet {
253253
fmt.Print("... Verified ok.")

s2/decode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func TestDecoderMaxBlockSize(t *testing.T) {
124124
return
125125
}
126126
if enc.pad > 0 && buf.Len()%enc.pad != 0 {
127-
t.Error(fmt.Errorf("wanted size to be mutiple of %d, got size %d with remainder %d", enc.pad, buf.Len(), buf.Len()%enc.pad))
127+
t.Error(fmt.Errorf("wanted size to be multiple of %d, got size %d with remainder %d", enc.pad, buf.Len(), buf.Len()%enc.pad))
128128
return
129129
}
130130
encoded := buf.Bytes()

0 commit comments

Comments
 (0)