Sha256: ec3c023a6575a811b9e21efb20722c70b945b161d5aa59ccd2214890cea8c474

Contents?: true

Size: 1.3 KB

Versions: 20

Compression:

Stored size: 1.3 KB

Contents

module HTTPX
  module Plugins
    module Compression

      type deflatable = _Reader | _ToS

      interface _Deflater
        def deflate: (deflatable, ?_Writer, ?chunk_size: Integer) -> _ToS
                   | (deflatable, ?_Writer, ?chunk_size: Integer) { (String) -> void } -> _ToS
      end

      interface _Inflater
        def inflate: (string) -> String

        def initialize: (Integer | Float bytesize) -> untyped
      end

      interface _Compressor
        def deflater: () -> _Deflater
        def inflater: (Integer | Float bytesize) -> _Inflater
      end

      def self.configure: (singleton(Session)) -> void

      interface _CompressionOptions
        def encodings: () -> Hash[String, _Compressor]
      end

      def self.extra_options: (Options) -> (Options & _CompressionOptions)


      module ResponseBodyMethods
        @encodings: Array[String]
        @_deflaters: Array[_Deflater]

        private

        def decompress: (string) -> String
      end

      class Encoder
        include Transcoder::_Encoder
        include _ToS
        include _Each[String]

        def close: () -> void

      	private

        def initialize: (deflatable body, _Deflater deflater) -> untyped
        def deflate: () -> void
                   | () { (String) -> void } -> void
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
httpx-1.3.4 sig/plugins/compression.rbs
httpx-1.3.3 sig/plugins/compression.rbs
httpx-1.3.2 sig/plugins/compression.rbs
httpx-1.3.1 sig/plugins/compression.rbs
httpx-1.3.0 sig/plugins/compression.rbs
httpx-1.2.6 sig/plugins/compression.rbs
httpx-1.2.4 sig/plugins/compression.rbs
httpx-1.2.3 sig/plugins/compression.rbs
httpx-1.2.2 sig/plugins/compression.rbs
httpx-1.2.1 sig/plugins/compression.rbs
httpx-1.2.0 sig/plugins/compression.rbs
httpx-1.1.5 sig/plugins/compression.rbs
httpx-1.1.4 sig/plugins/compression.rbs
httpx-1.1.3 sig/plugins/compression.rbs
httpx-1.1.2 sig/plugins/compression.rbs
httpx-1.1.1 sig/plugins/compression.rbs
httpx-1.1.0 sig/plugins/compression.rbs
httpx-1.0.2 sig/plugins/compression.rbs
httpx-1.0.1 sig/plugins/compression.rbs
httpx-1.0.0 sig/plugins/compression.rbs