summaryrefslogtreecommitdiff
path: root/vendor/github.com/ulikunitz/xz/README.md
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/github.com/ulikunitz/xz/README.md
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/ulikunitz/xz/README.md')
-rw-r--r--vendor/github.com/ulikunitz/xz/README.md72
1 files changed, 37 insertions, 35 deletions
diff --git a/vendor/github.com/ulikunitz/xz/README.md b/vendor/github.com/ulikunitz/xz/README.md
index 969ae7a00..0a2dc8284 100644
--- a/vendor/github.com/ulikunitz/xz/README.md
+++ b/vendor/github.com/ulikunitz/xz/README.md
@@ -12,46 +12,48 @@ have been developed over a long time and are highly optimized. However
there are a number of improvements planned and I'm very optimistic about
parallel compression and decompression. Stay tuned!
-# Using the API
+## Using the API
The following example program shows how to use the API.
- package main
-
- import (
- "bytes"
- "io"
- "log"
- "os"
-
- "github.com/ulikunitz/xz"
- )
-
- func main() {
- const text = "The quick brown fox jumps over the lazy dog.\n"
- var buf bytes.Buffer
- // compress text
- w, err := xz.NewWriter(&buf)
- if err != nil {
- log.Fatalf("xz.NewWriter error %s", err)
- }
- if _, err := io.WriteString(w, text); err != nil {
- log.Fatalf("WriteString error %s", err)
- }
- if err := w.Close(); err != nil {
- log.Fatalf("w.Close error %s", err)
- }
- // decompress buffer and write output to stdout
- r, err := xz.NewReader(&buf)
- if err != nil {
- log.Fatalf("NewReader error %s", err)
- }
- if _, err = io.Copy(os.Stdout, r); err != nil {
- log.Fatalf("io.Copy error %s", err)
- }
+```go
+package main
+
+import (
+ "bytes"
+ "io"
+ "log"
+ "os"
+
+ "github.com/ulikunitz/xz"
+)
+
+func main() {
+ const text = "The quick brown fox jumps over the lazy dog.\n"
+ var buf bytes.Buffer
+ // compress text
+ w, err := xz.NewWriter(&buf)
+ if err != nil {
+ log.Fatalf("xz.NewWriter error %s", err)
}
+ if _, err := io.WriteString(w, text); err != nil {
+ log.Fatalf("WriteString error %s", err)
+ }
+ if err := w.Close(); err != nil {
+ log.Fatalf("w.Close error %s", err)
+ }
+ // decompress buffer and write output to stdout
+ r, err := xz.NewReader(&buf)
+ if err != nil {
+ log.Fatalf("NewReader error %s", err)
+ }
+ if _, err = io.Copy(os.Stdout, r); err != nil {
+ log.Fatalf("io.Copy error %s", err)
+ }
+}
+```
-# Using the gxz compression tool
+## Using the gxz compression tool
The package includes a gxz command line utility for compression and
decompression.