Module: HTTPX::Plugins::Compression::Deflate

Defined in:
lib/httpx/plugins/compression/deflate.rb

Defined Under Namespace

Modules: Encoder

Class Method Summary collapse

Class Method Details

.configureObject



12
13
14
# File 'lib/httpx/plugins/compression/deflate.rb', line 12

def self.configure(*)
  Compression.register "deflate", self
end

.decoderObject



43
44
45
# File 'lib/httpx/plugins/compression/deflate.rb', line 43

def decoder
  Decoder.new(Zlib::Inflate.new(32 + Zlib::MAX_WBITS))
end

.encoderObject



39
40
41
# File 'lib/httpx/plugins/compression/deflate.rb', line 39

def encoder
  Encoder
end

.load_dependenciesObject



7
8
9
10
# File 'lib/httpx/plugins/compression/deflate.rb', line 7

def self.load_dependencies(*)
  require "stringio"
  require "zlib"
end