Quintus/ruby-xz — Issue #2: Stream (`IO`-like) mode would be great
Author: dadooda
Created: 2011-12-13 21:39:26+00:00
State: open

Hi!

String-to-string decompression is great, but sometimes stream mode is very handy. For example, to support `.tar.xz` decompression on the fly. Here comes Gzip/plain file example:

```
stream = fn.match /\.gz\z/
Zlib::GzipReader.open(fn)
elsif fn.match /\.tar\z/
File.open(fn)
else
raise "Error: Don't know how to handle '#{fn}', aborting"
end

untar = Gem::Package::TarReader.new(stream)
untar.each do |entry|
...
end
```

Do you think liblzma would allow to implement `IO`-like streaming in `ruby-xz`, too?