Class: LZMA
- Inherits:
-
Object
- Object
- LZMA
- Defined in:
- lib/lzma.rb,
lib/lzma.rb,
ext/lzma_ruby.cpp
Class Method Summary collapse
Instance Method Summary collapse
- #compress(data) ⇒ Object
- #decompress(data) ⇒ Object
-
#initialize ⇒ LZMA
constructor
A new instance of LZMA.
Constructor Details
#initialize ⇒ LZMA
Returns a new instance of LZMA.
11 12 13 |
# File 'lib/lzma.rb', line 11 def initialize @lzma = com.ephemeronindustries.lzma.LZMA.new end |
Class Method Details
Instance Method Details
#compress(data) ⇒ Object
15 16 17 |
# File 'lib/lzma.rb', line 15 def compress(data) String.from_java_bytes @lzma.compress(data.to_java_bytes) end |
#decompress(data) ⇒ Object
19 20 21 |
# File 'lib/lzma.rb', line 19 def decompress(data) String.from_java_bytes @lzma.decompress(data.to_java_bytes) end |