aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/ulikunitz/xz
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/ulikunitz/xz')
-rw-r--r--vendor/github.com/ulikunitz/xz/README.md72
-rw-r--r--vendor/github.com/ulikunitz/xz/TODO.md14
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/encoder.go2
3 files changed, 47 insertions, 41 deletions
diff --git a/vendor/github.com/ulikunitz/xz/README.md b/vendor/github.com/ulikunitz/xz/README.md
index 969ae7a..0a2dc82 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
12there are a number of improvements planned and I'm very optimistic about 12there are a number of improvements planned and I'm very optimistic about
13parallel compression and decompression. Stay tuned! 13parallel compression and decompression. Stay tuned!
14 14
15# Using the API 15## Using the API
16 16
17The following example program shows how to use the API. 17The following example program shows how to use the API.
18 18
19 package main 19```go
20 20package main
21 import ( 21
22 "bytes" 22import (
23 "io" 23 "bytes"
24 "log" 24 "io"
25 "os" 25 "log"
26 26 "os"
27 "github.com/ulikunitz/xz" 27
28 ) 28 "github.com/ulikunitz/xz"
29 29)
30 func main() { 30
31 const text = "The quick brown fox jumps over the lazy dog.\n" 31func main() {
32 var buf bytes.Buffer 32 const text = "The quick brown fox jumps over the lazy dog.\n"
33 // compress text 33 var buf bytes.Buffer
34 w, err := xz.NewWriter(&buf) 34 // compress text
35 if err != nil { 35 w, err := xz.NewWriter(&buf)
36 log.Fatalf("xz.NewWriter error %s", err) 36 if err != nil {
37 } 37 log.Fatalf("xz.NewWriter error %s", err)
38 if _, err := io.WriteString(w, text); err != nil {
39 log.Fatalf("WriteString error %s", err)
40 }
41 if err := w.Close(); err != nil {
42 log.Fatalf("w.Close error %s", err)
43 }
44 // decompress buffer and write output to stdout
45 r, err := xz.NewReader(&buf)
46 if err != nil {
47 log.Fatalf("NewReader error %s", err)
48 }
49 if _, err = io.Copy(os.Stdout, r); err != nil {
50 log.Fatalf("io.Copy error %s", err)
51 }
52 } 38 }
39 if _, err := io.WriteString(w, text); err != nil {
40 log.Fatalf("WriteString error %s", err)
41 }
42 if err := w.Close(); err != nil {
43 log.Fatalf("w.Close error %s", err)
44 }
45 // decompress buffer and write output to stdout
46 r, err := xz.NewReader(&buf)
47 if err != nil {
48 log.Fatalf("NewReader error %s", err)
49 }
50 if _, err = io.Copy(os.Stdout, r); err != nil {
51 log.Fatalf("io.Copy error %s", err)
52 }
53}
54```
53 55
54# Using the gxz compression tool 56## Using the gxz compression tool
55 57
56The package includes a gxz command line utility for compression and 58The package includes a gxz command line utility for compression and
57decompression. 59decompression.
diff --git a/vendor/github.com/ulikunitz/xz/TODO.md b/vendor/github.com/ulikunitz/xz/TODO.md
index 7b34c0c..c10e51b 100644
--- a/vendor/github.com/ulikunitz/xz/TODO.md
+++ b/vendor/github.com/ulikunitz/xz/TODO.md
@@ -86,6 +86,10 @@
86 86
87## Log 87## Log
88 88
89### 2018-10-28
90
91Release v0.5.5 fixes issues #19 observing ErrLimit outputs.
92
89### 2017-06-05 93### 2017-06-05
90 94
91Release v0.5.4 fixes issues #15 of another problem with the padding size 95Release v0.5.4 fixes issues #15 of another problem with the padding size
@@ -102,7 +106,7 @@ Release v0.5.2 became necessary to allow the decoding of xz files with
1024-byte padding in the block header. Many thanks to Greg, who reported 1064-byte padding in the block header. Many thanks to Greg, who reported
103the issue. 107the issue.
104 108
105### 2016-07-23 109### 2016-07-23
106 110
107Release v0.5.1 became necessary to fix problems with 32-bit platforms. 111Release v0.5.1 became necessary to fix problems with 32-bit platforms.
108Many thanks to Bruno Brigas, who reported the issue. 112Many thanks to Bruno Brigas, who reported the issue.
@@ -194,7 +198,7 @@ and lzma.Writer and fixed the error handling.
194By computing the bit length of the LZMA operations I was able to 198By computing the bit length of the LZMA operations I was able to
195improve the greedy algorithm implementation. By using an 8 MByte buffer 199improve the greedy algorithm implementation. By using an 8 MByte buffer
196the compression rate was not as good as for xz but already better then 200the compression rate was not as good as for xz but already better then
197gzip default. 201gzip default.
198 202
199Compression is currently slow, but this is something we will be able to 203Compression is currently slow, but this is something we will be able to
200improve over time. 204improve over time.
@@ -213,7 +217,7 @@ The package lzb contains now the basic implementation for creating or
213reading LZMA byte streams. It allows the support for the implementation 217reading LZMA byte streams. It allows the support for the implementation
214of the DAG-shortest-path algorithm for the compression function. 218of the DAG-shortest-path algorithm for the compression function.
215 219
216### 2015-04-23 220### 2015-04-23
217 221
218Completed yesterday the lzbase classes. I'm a little bit concerned that 222Completed yesterday the lzbase classes. I'm a little bit concerned that
219using the components may require too much code, but on the other hand 223using the components may require too much code, but on the other hand
@@ -242,7 +246,7 @@ right lzbase.Reader and lzbase.Writer.
242 246
243As a start I have implemented ReaderState and WriterState to ensure 247As a start I have implemented ReaderState and WriterState to ensure
244that the state for reading is only used by readers and WriterState only 248that the state for reading is only used by readers and WriterState only
245used by Writers. 249used by Writers.
246 250
247### 2015-04-20 251### 2015-04-20
248 252
@@ -274,7 +278,7 @@ almost all files from lzma.
274 278
275### 2015-03-31 279### 2015-03-31
276 280
277Removed only a TODO item. 281Removed only a TODO item.
278 282
279However in Francesco Campoy's presentation "Go for Javaneros 283However in Francesco Campoy's presentation "Go for Javaneros
280(Javaïstes?)" is the the idea that using an embedded field E, all the 284(Javaïstes?)" is the the idea that using an embedded field E, all the
diff --git a/vendor/github.com/ulikunitz/xz/lzma/encoder.go b/vendor/github.com/ulikunitz/xz/lzma/encoder.go
index 18ce009..fe1900a 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/encoder.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/encoder.go
@@ -11,7 +11,7 @@ import (
11 11
12// opLenMargin provides the upper limit of the number of bytes required 12// opLenMargin provides the upper limit of the number of bytes required
13// to encode a single operation. 13// to encode a single operation.
14const opLenMargin = 10 14const opLenMargin = 16
15 15
16// compressFlags control the compression process. 16// compressFlags control the compression process.
17type compressFlags uint32 17type compressFlags uint32