Skip to content

Commit 4a36836

Browse files
authored
doc: Clarify documentation in readme (#1125)
Reduce duplication, improve consistency, fix missing language
1 parent 4309644 commit 4a36836

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ While the release has been extensively tested, it is recommended to testing when
609609

610610
# deflate usage
611611

612-
The packages are drop-in replacements for standard libraries. Simply replace the import path to use them:
612+
The packages are drop-in replacements for standard library [deflate](https://godoc.org/github.com/klauspost/compress/flate), [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip), and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). Simply replace the import path to use them:
613613

614614
Typical speed is about 2x of the standard library packages.
615615

@@ -620,17 +620,15 @@ Typical speed is about 2x of the standard library packages.
620620
| `archive/zip` | `github.com/klauspost/compress/zip` | [zip](https://pkg.go.dev/github.com/klauspost/compress/zip?tab=doc) |
621621
| `compress/flate` | `github.com/klauspost/compress/flate` | [flate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc) |
622622

623-
* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib).
624-
625-
You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.
623+
You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop-in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.
626624

627-
The packages contains the same as the standard library, so you can use the godoc for that: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).
625+
The packages implement the same API as the standard library, so you can use the original godoc documentation: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).
628626

629627
Currently there is only minor speedup on decompression (mostly CRC32 calculation).
630628

631629
Memory usage is typically 1MB for a Writer. stdlib is in the same range.
632630
If you expect to have a lot of concurrently allocated Writers consider using
633-
the stateless compress described below.
631+
the stateless compression described below.
634632

635633
For compression performance, see: [this spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing).
636634

@@ -692,3 +690,4 @@ This code is licensed under the same conditions as the original Go code. See LIC
692690

693691

694692

693+

0 commit comments

Comments
 (0)