]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_ruby/lib/maasha/filesys.rb
disabling buggy bzip2-ruby
[biopieces.git] / code_ruby / lib / maasha / filesys.rb
index 6a6067fbc859bb3df62a7f4eda547c0f44d8070c..4f58898b91977a3dbc1695ed3191018b316bc34e 100644 (file)
@@ -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