Sha256: fe9d762ef634da5236add7e9951c2c920a748b09c9a6b51fa7fff83f2c88ea50

Contents?: true

Size: 243 Bytes

Versions: 1

Compression:

Stored size: 243 Bytes

Contents

require 'rbzip2'
require 'base64'
module BZip2Input
  module_function

  def compress(input)
    string = StringIO.new
    bz2 = RBzip2::FFI::Compressor.new string
    bz2.write input
    bz2.close
    Base64.encode64(string.string)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
judge_system-1.7.4 lib/zlib_input.rb