Class: CoderDecorator::Coders::Zip

Inherits:
Coder
  • Object
show all
Defined in:
lib/coder_decorator/coders/zip.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Coder

#coder

Instance Method Summary collapse

Methods inherited from Coder

#initialize

Constructor Details

This class inherits a constructor from CoderDecorator::Coders::Coder

Instance Method Details

#decode(str) ⇒ Object



12
13
14
# File 'lib/coder_decorator/coders/zip.rb', line 12

def decode(str)
  coder.decode(::Zlib::Inflate.inflate(str))
end

#encode(str) ⇒ Object



8
9
10
# File 'lib/coder_decorator/coders/zip.rb', line 8

def encode(str)
  ::Zlib::Deflate.deflate(coder.encode(str))
end