lib/zlib_input.rb in judge_system-1.7.2 vs lib/zlib_input.rb in judge_system-1.7.3
- old
+ new
@@ -1,12 +1,12 @@
require 'rbzip2'
require 'base64'
module BZip2Input
- def compress input
- string = StringIO.new
- bz2 = RBzip2::FFI::Compressor.new string
- bz2.write input
- bz2.close
- Base64.encode64(string.string)
- end
- module_function :compress
-end
\ No newline at end of file
+ def compress(input)
+ string = StringIO.new
+ bz2 = RBzip2::FFI::Compressor.new string
+ bz2.write input
+ bz2.close
+ Base64.encode64(string.string)
+ end
+ module_function :compress
+end