mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-15 00:00:39 -04:00
28 lines
584 B
Plaintext
28 lines
584 B
Plaintext
module HTTPX
|
|
module Transcoder
|
|
module GZIP
|
|
def self?.encode: (_Encoder body) -> Deflater
|
|
def self?.decode: (Response response, ?bytesize: Integer) -> Inflater
|
|
|
|
class Deflater < Transcoder::Deflater
|
|
@compressed_chunk: String
|
|
|
|
private
|
|
|
|
def write: (String chunk) -> void
|
|
|
|
def compressed_chunk: () -> String
|
|
end
|
|
|
|
class Inflater
|
|
@inflater: Zlib::Inflate
|
|
@bytesize: Integer
|
|
|
|
def initialize: (Integer | Float bytesize) -> void
|
|
|
|
def call: (String chunk) -> String
|
|
end
|
|
end
|
|
end
|
|
end
|