Class: Dalli::Compressor

Inherits:
Object
  • Object
show all
Defined in:
lib/dalli/compressor.rb

Overview

Default compressor used by Dalli, that uses Zlib DEFLATE to compress data.

Class Method Summary collapse

Class Method Details

.compress(data) ⇒ Object



12
13
14
# File 'lib/dalli/compressor.rb', line 12

def self.compress(data)
  Zlib::Deflate.deflate(data)
end

.decompress(data) ⇒ Object



16
17
18
# File 'lib/dalli/compressor.rb', line 16

def self.decompress(data)
  Zlib::Inflate.inflate(data)
end