ruby-xz is a basic binding to the famous liblzma library,
best known for the extreme compression-ratio it’s native XZ format
achieves. ruby-xz gives you the possibility of creating and extracting
XZ archives on any platform where liblzma is installed. No compilation
is needed, because ruby-xz is written on top of Ruby’s
(part of the standard libary). ruby-xz does not have any dependencies
other than Ruby itself.
ruby-xz supports both “intuitive” (de)compression by providing methods to directly operate on strings and files, but also allows you to operate directly on IO streams (see the various methods of the XZ module). Additionally, it provides an API similar to Ruby’s GzipReader and GzipWriter that allow you to treat compressed files as if they were an IO instance.
2018-05-20: Version 1.0.0 released
After years of development stalling, I have dedicated some time to
ruby-xz again and greatly overhauled it. All dependencies (
io-like until now) have been dropped; ruby-xz doesn’t have any
dependencies outside of Ruby’s stdlib anymore. The long argument lists
in methods have been replaced by keyword arguments, and it now
properly honours Ruby’s concept of external and internal
encodings. Furthermore, the API has been mostly synchronised with
Ruby’s zlib library. Only small differences remain (such as ruby-xz
employing real Ruby keyword arguments).
This release breaks the API pretty heavily, so expect you need to adapt your code. If you only used the simplest invocations of methods directly on the XZ module, you might however come away without changes. Take a look at the HISTORY.rdoc file in the sources for a detailed list of changes.
2018-05-20: New website
ruby-xz has moved from GitHub to my personal web space. The GitHub project remains a mirror and hosts the bugtracker.
The stable release is 1.0.0 and is available via RubyGems.
The source code can be viewed online. To clone the repository to your local machine:
$ git clone git://git.guelker.eu/ruby-xz.git
There’s also a GitHub mirror.
The issue tracker continues to be hosted on GitHub.
ruby-xz is documented via RDoc. Run the
rdoc rake task in the source
tree to generate the documentation. Alternatively, use your local
Gemserver or browse the documentation online
(only latest version).
ruby-xz is distributed under the MIT license.