X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=code_ruby%2Flib%2Fmaasha%2Ffilesys.rb;h=4f58898b91977a3dbc1695ed3191018b316bc34e;hb=508d11515a4f8ac768829b56486c1b660b8f247e;hp=6a6067fbc859bb3df62a7f4eda547c0f44d8070c;hpb=3ce24a349c10a76d3e837e08b81259204ab870fe;p=biopieces.git diff --git a/code_ruby/lib/maasha/filesys.rb b/code_ruby/lib/maasha/filesys.rb index 6a6067f..4f58898 100644 --- a/code_ruby/lib/maasha/filesys.rb +++ b/code_ruby/lib/maasha/filesys.rb @@ -23,7 +23,8 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< require 'zlib' -require 'bzip2' +# require 'bzip2' +require 'open3' # Error class for all exceptions to do with Filesys. class FilesysError < StandardError; end @@ -51,7 +52,8 @@ class Filesys when :gzip ios = Zlib::GzipWriter.new File.open(file, mode, options) when :bzip, :bzip2 - ios = Bzip2::Writer.new File.open(file, mode, options) + # ios = Bzip2::Writer.new File.open(file, mode, options) # TODO being pissed with buggy bzip2 gem. + ios, = Open3.pipeline_w("bzip2 -c", out: file) else ios = File.open(file, mode, options) end