ruby-xz 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 820fac81115af7c562998d1c80cce241d045c210
4
- data.tar.gz: 31823023e5de3c452f8d0b82b643732ff0294658
2
+ SHA256:
3
+ metadata.gz: 9826b10c06d748022a2246bf9888c7b033f0d7fca2383303d8e75b7f871dac21
4
+ data.tar.gz: f8b6047714b8390890f8a097b98caf78b92f3d902f8c48898c0bbdc5353c4b96
5
5
  SHA512:
6
- metadata.gz: 35aa3ebe08c3e82b4cc81339c23af1d78073ffb4d174f56079808f482ae60061c329aeed2fcbec56eb34e81102ed30bb3f32240f85436d5b99142df48e925f29
7
- data.tar.gz: a83b6fc3ca7b397af5695877fde63ff8642fa60a689d36b505cbf08717ea2b4c22b182e484bd55aa66a49f90fb132da17e7cd7a2caf1250175590127fb7f0565
6
+ metadata.gz: b59d8b288be8180a15d1718bce8836138b7efb3d26c6e0e41b24f493561bbb10c8821932d6dc10dbba05774948c2e2990c14af7bf7acb24afce78cb980481b90
7
+ data.tar.gz: 0a1f54092cfe6122ff1857e7917c232d7333c87f16a3e82dc5bec90d098c2e431ef15ffa6a3d23fa8a67595717e28bfce174a83f3b9d9663b01799d3adbd6087
data/AUTHORS CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  All the people who worked on this project, in alphabetical order.
4
4
 
5
- * Marvin Gülker (Quintus) <m-guelker@phoenixmail.de>
6
- * Christoph Plank (chrisistuff)
5
+ * Marvin Gülker (github.com/Quintus) <m-guelker@phoenixmail.de>
6
+ * Alex Gittemeier (github.com/win93) <me@a.lexg.dev>
7
+ * Christoph Plank (github.com/chrisistuff)
data/HISTORY.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = Version history
2
2
 
3
+ == 1.0.1 (2021-11-13)
4
+ * Fix a buffer overflow error in XZ::Stream (PR Quintus#17 by genail)
5
+ * Fix an issue with transcode_options that was introduced by Ruby 3 (PR win93#1 by Alex Gittemeier)
6
+ * Update project README, gemspec, and other metadata to reflect a change in
7
+ maintainership. All prior releases were released by Marvin Gülker.
8
+
3
9
  == 1.0.0 (2018-05-20)
4
10
 
5
11
  * *BreakingChange* The XZ module's methods now take any parameters
@@ -10,7 +16,7 @@
10
16
  returning BINARY-tagged strings.
11
17
  * *BreakingChange* Remove deprecated API on stream reader/writer
12
18
  class and instead sync the API with Ruby's zlib library
13
- (Ticket #12 by me).
19
+ (Ticket Quintus#12 by Quintus).
14
20
  * *BreakingChange* StreamWriter.new and StreamReader.new do not accept
15
21
  a block anymore. This is part of syncing with Ruby's zlib API.
16
22
  * *BreakingChange* StreamReader.open and StreamWriter.open always
@@ -40,9 +46,9 @@
40
46
  * *Dependency* Remove dependency on ffi. ruby-xz now uses fiddle from
41
47
  the stdlib instead.
42
48
  * *Dependency* Remove dependency on io-like. ruby-xz now implements
43
- all the IO mechanics itself. (Ticket #10 by me)
49
+ all the IO mechanics itself. (Ticket Quintus#10 by Quintus)
44
50
  * *Dependency* Bump required Ruby version to 2.3.0.
45
- * *Fix* libzlma.dylib not being found on OS X (Ticket #15 by
51
+ * *Fix* libzlma.dylib not being found on OS X (Ticket Quintus#15 by
46
52
  s0nspark).
47
53
 
48
54
  == 0.2.3 (2015-12-29)
@@ -60,7 +66,7 @@
60
66
  * *Deprecate* use of XZ::StreamWriter.new with a filename argument
61
67
  * *Deprecate* nonautomatic IO close in XZ::StreamReader#close
62
68
  * *Deprecate* nonautomatic IO close in XZ::StreamWriter#close
63
- * *Fix* incompatibility with Resolv.getaddress() in Ruby 2.2 (Ticket #13
69
+ * *Fix* incompatibility with Resolv.getaddress() in Ruby 2.2 (Ticket Quintus#13
64
70
  by Ken Simon)
65
71
  * Goal of these deprecations is to sync the API with Ruby’s own
66
72
  Zlib::GzipWriter and Zlib::GzipReader mostly.
@@ -71,12 +77,12 @@
71
77
 
72
78
  == 0.2.1 (2014-02-08)
73
79
 
74
- * Build the gem properly on Ruby 2.0+ (PR #8 by Nana Sakisaka (saki7))
75
- * Release the GIL when interfacing with liblzma (PR #7 by Lars Christensen (larsch))
80
+ * Build the gem properly on Ruby 2.0+ (PR Quintus#8 by Nana Sakisaka (saki7))
81
+ * Release the GIL when interfacing with liblzma (PR Quintus#7 by Lars Christensen (larsch))
76
82
 
77
83
  == 0.2.0 (2013-06-23)
78
84
 
79
- * Fix #6 (errors on JRuby) by Ben Nagy
85
+ * Fix Quintus#6 (errors on JRuby) by Ben Nagy
80
86
  * <b>Remove 1.8 compatibility</b>
81
87
 
82
88
  == 0.1.0 (2013-02-17)
data/README.md CHANGED
@@ -1,64 +1,62 @@
1
- ruby-xz
2
- =======
1
+ # ruby-xz
3
2
 
4
- **ruby-xz** is a basic binding to the famous [liblzma library][1],
5
- best known for the extreme compression-ratio it's native *XZ* format
6
- achieves. ruby-xz gives you the possibility of creating and extracting
7
- XZ archives on any platform where liblzma is installed. No compilation
8
- is needed, because ruby-xz is written on top of Ruby's fiddle” library
9
- (part of the standard libary). ruby-xz does not have any dependencies
10
- other than Ruby itself.
3
+ **ruby-xz** is a basic binding to the famous [liblzma] library,
4
+ best known for the extreme compression-ratio it's native *XZ* format achieves.
5
+ ruby-xz gives you the possibility of creating and extracting XZ archives on any
6
+ platform where liblzma is installed.
7
+ No compilation is needed, because ruby-xz is written on top of Ruby's [fiddle]
8
+ library (part of the standard library).
9
+ ruby-xz does not have any dependencies other than Ruby itself.
11
10
 
12
- ruby-xz supports both “intuitive” (de)compression by providing methods to
13
- directly operate on strings and files, but also allows you to operate
14
- directly on IO streams (see the various methods of the XZ module). On top
15
- of that, ruby-xz offers an advanced interface that allows you to treat
16
- XZ-compressed data as IO streams, both for reading and for writing. See the
17
- XZ::StreamReader and XZ::StreamWriter classes for more information on this.
11
+ rubv-xz supports compression and decompression via methods that operate on
12
+ strings and files, and it also supports compression and decompression on IO
13
+ streams.
14
+ the XZ::StreamReader and XZ::StreamWriter offer advanced interfaces that allow
15
+ you to treat XZ-compressed data as IO streams, both for reading and for writing.
16
+ <!-- TODO: link to relevant parts of the source code and/or documentation -->
18
17
 
19
- **Note**: Version 1.0.0 breaks the API quite heavily. Refer to
20
- HISTORY.rdoc for details.
18
+ **Note**: Version 1.0.0 breaks the API quite heavily.
19
+ Refer to HISTORY.rdoc for details.
21
20
 
22
- Installation
23
- ------------
21
+ ## Installation
24
22
 
25
- Install it the way you install all your gems.
23
+ Install with `gem` from your Ruby installation:
26
24
 
27
- ```
28
- $ gem install ruby-xz
25
+ ```sh
26
+ gem install ruby-xz
29
27
  ```
30
28
 
31
- Alternatively, you can clone the repository and build the most recent
32
- code yourself:
29
+ Alternatively, add it to your Gemfile via:
33
30
 
34
- ```
35
- $ git clone git://git.guelker.eu/ruby-xz.git
36
- $ cd ruby-xz
37
- $ rake gem
38
- $ gem install pkg/ruby-xz-*.gem
31
+ ```sh
32
+ bundle add ruby-xz
39
33
  ```
40
34
 
41
- Usage
42
- -----
35
+ If you want to be on the bleeding edge, you can clone the repository and build
36
+ the most recent code yourself:
43
37
 
44
- The documentation of the XZ module is well and you should be able to find
45
- everything you need to use ruby-xz. As said, it's not big, but powerful:
46
- You can create and extract whole archive files, compress or decompress
47
- streams of data or just plain strings.
38
+ ```sh
39
+ git clone https://github.com/win93/ruby-xz.git
40
+ cd ruby-xz
41
+ rake gem
42
+ gem install pkg/ruby-xz-*.gem
43
+ ```
48
44
 
49
- You can read the documentation on your local gemserver, or browse it [online][2].
45
+ ## Usage
50
46
 
51
- ### Require ###
47
+ You should be able to find everything you need to use ruby-xz in the
48
+ documentation.
49
+ It's small but powerful: You can create and extract whole archive files,
50
+ compress or decompress whole files, strings, or streams of data.
52
51
 
53
- You have to require the “xz.rb” file:
52
+ You can read the documentation on your local gemserver, or browse it [online][rubydoc].
53
+ <!-- TODO how do I read the docs on my local gemserver? -->
54
54
 
55
- ``` ruby
56
- require "xz"
57
- ```
58
-
59
- ### Examples ###
55
+ ### Examples
60
56
 
61
57
  ``` ruby
58
+ require 'xz'
59
+
62
60
  # Compress a file
63
61
  XZ.compress_file("myfile.txt", "myfile.txt.xz")
64
62
  # Decompress it
@@ -74,16 +72,17 @@ comp = XZ.compress("Mydata")
74
72
  data = XZ.decompress(comp)
75
73
  ```
76
74
 
77
- Have a look at the XZ module's documentation for an in-depth description of
78
- what is possible.
75
+ Have a look at the XZ module's documentation for an in-depth description of what
76
+ is possible.
77
+ <!-- TODO link to such documentation -->
79
78
 
80
- ### Usage with the minitar gem ###
79
+ ### Usage with the minitar gem
81
80
 
82
- ruby-xz can be used together with the [minitar][3] library (formerly
83
- “archive-tar-minitar”) to create XZ-compressed tarballs. This works by
84
- employing the IO-like classes XZ::StreamReader and XZ::StreamWriter
85
- analogous to how one would use Ruby's “zlib” library together with
86
- “minitar”. Example:
81
+ ruby-xz can be used together with the [minitar] library (formerly
82
+ “archive-tar-minitar”) to create XZ-compressed tarballs.
83
+ This works by employing the IO-like classes XZ::StreamReader and
84
+ XZ::StreamWriter analogous to how one would use Ruby's “zlib” library together
85
+ with “minitar”:
87
86
 
88
87
  ``` ruby
89
88
  require "xz"
@@ -100,19 +99,24 @@ XZ::StreamReader.open("tarball.tar.xz") do |txz|
100
99
  end
101
100
  ```
102
101
 
103
- Links
104
- -----
102
+ ## Links
105
103
 
106
- * Website: https://mg.guelker.eu/projects/ruby-xz/
107
- * Online documentation: https://mg.guelker.eu/projects/ruby-xz/doc
108
- * Code repository: https://git.guelker.eu/?p=ruby-xz.git;a=summary
109
- * Issue tracker: https://github.com/Quintus/ruby-xz/issues
104
+ * Online documentation: <https://rubydoc.info/gems/ruby-xz>
105
+ * Code repository: <https://github.com/win93/ruby-xz>
106
+ * Issue tracker: <https://github.com/win93/ruby-xz/issues>
110
107
 
111
- License
112
- -------
108
+ ## License
113
109
 
114
110
  MIT license; see LICENSE for the full license text.
115
111
 
116
- [1]: https://tukaani.org/xz/
117
- [2]: https://mg.guelker.eu/projects/ruby-xz/doc
118
- [3]: https://github.com/halostatue/minitar
112
+ ## Acknowledgements
113
+
114
+ On November 2021, I volunteered to take over maintenance of this project, which
115
+ was forked from <https://github.com/Quintus/ruby-xz>.
116
+ @Quintus maintained this project until 1.0.0, see HISTORY.rdoc for more details.
117
+
118
+
119
+ [fiddle]: https://github.com/ruby/fiddle
120
+ [liblzma]: https://tukaani.org/xz/
121
+ [rubydoc]: https://www.rubydoc.info/gems/ruby-xz
122
+ [minitar]: https://github.com/halostatue/minitar
data/lib/xz/stream.rb CHANGED
@@ -118,7 +118,7 @@ class XZ::Stream
118
118
  pos = 0
119
119
  until pos > str.bytesize # Do not use >=, that conflicts with #lzma_finish
120
120
  substr = str[pos, XZ::CHUNK_SIZE]
121
- @input_buffer_p[0, str.bytesize] = substr
121
+ @input_buffer_p[0, substr.bytesize] = substr
122
122
  pos += XZ::CHUNK_SIZE
123
123
 
124
124
  @lzma_stream.next_in = @input_buffer_p
@@ -250,7 +250,7 @@ class XZ::StreamReader < XZ::Stream
250
250
  # Now, transcode it to the internal encoding if that was requested.
251
251
  # Otherwise return it with the external encoding as-is.
252
252
  if @internal_encoding
253
- @readbuf.encode!(@internal_encoding, @transcode_options)
253
+ @readbuf.encode!(@internal_encoding, **@transcode_options)
254
254
  outbuf.force_encoding(@internal_encoding)
255
255
  else
256
256
  outbuf.force_encoding(@external_encoding)
data/lib/xz/version.rb CHANGED
@@ -28,6 +28,6 @@
28
28
  module XZ
29
29
 
30
30
  # The version of this library.
31
- VERSION = "1.0.0".freeze
31
+ VERSION = "1.0.1".freeze
32
32
 
33
33
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-xz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Gülker
8
- autorequire:
8
+ - Alex Gittemeier
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-05-20 00:00:00.000000000 Z
12
+ date: 2021-11-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: minitar
@@ -24,13 +25,41 @@ dependencies:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
27
  version: '0.6'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '13.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '13.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: minitest
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '5.14'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '5.14'
27
56
  description: |
28
57
  These are simple Ruby bindings for the liblzma library
29
58
  (http://tukaani.org/xz/), which is best known for the
30
59
  extreme compression ratio its native XZ format achieves.
31
60
  Since fiddle is used to implement the bindings, no compilation
32
61
  is needed.
33
- email: m-guelker@phoenixmail.de
62
+ email: me@a.lexg.dev
34
63
  executables: []
35
64
  extensions: []
36
65
  extra_rdoc_files:
@@ -50,7 +79,7 @@ files:
50
79
  - lib/xz/stream_reader.rb
51
80
  - lib/xz/stream_writer.rb
52
81
  - lib/xz/version.rb
53
- homepage: https://mg.guelker.eu/projects/ruby-xz/
82
+ homepage: https://github.com/win93/ruby-xz
54
83
  licenses:
55
84
  - MIT
56
85
  metadata: {}
@@ -74,9 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
103
  - !ruby/object:Gem::Version
75
104
  version: '0'
76
105
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.5.2.1
79
- signing_key:
106
+ rubygems_version: 3.2.22
107
+ signing_key:
80
108
  specification_version: 4
81
109
  summary: XZ compression via liblzma for Ruby, using fiddle.
82
110
  test_files: []