Sha256: 69361a50ed241a85a377b8454d3a717eca2cc15e28347c4304767f90718b07e6

Contents?: true

Size: 1.26 KB

Versions: 26

Compression:

Stored size: 1.26 KB

Contents

module HTTPX
  module Plugins
    module Compression
      type encodings_registry = Registry[Symbol, Class]

      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: (Numeric bytesize) -> untyped
      end

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

      interface _CompressionOptions
        def compression_threshold_size: () -> Integer?

        def encodings: () -> encodings_registry?
      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

26 entries across 26 versions & 1 rubygems

Version Path
httpx-0.20.5 sig/plugins/compression.rbs
httpx-0.20.4 sig/plugins/compression.rbs
httpx-0.20.3 sig/plugins/compression.rbs
httpx-0.20.2 sig/plugins/compression.rbs
httpx-0.20.1 sig/plugins/compression.rbs
httpx-0.20.0 sig/plugins/compression.rbs
httpx-0.19.8 sig/plugins/compression.rbs
httpx-0.19.7 sig/plugins/compression.rbs
httpx-0.19.6 sig/plugins/compression.rbs
httpx-0.19.5 sig/plugins/compression.rbs
httpx-0.19.4 sig/plugins/compression.rbs
httpx-0.19.3 sig/plugins/compression.rbs
httpx-0.19.2 sig/plugins/compression.rbs
httpx-0.19.1 sig/plugins/compression.rbs
httpx-0.19.0 sig/plugins/compression.rbs
httpx-0.18.7 sig/plugins/compression.rbs
httpx-0.18.6 sig/plugins/compression.rbs
httpx-0.18.5 sig/plugins/compression.rbs
httpx-0.18.4 sig/plugins/compression.rbs
httpx-0.18.3 sig/plugins/compression.rbs