module HTTPX::Plugins::Compression::Brotli::Encoder

  1. lib/httpx/plugins/compression/brotli.rb

Methods

Public Instance

  1. deflate

Public Instance methods

deflate (raw, buffer, chunk_size:)
[show source]
   # File lib/httpx/plugins/compression/brotli.rb
19 def deflate(raw, buffer, chunk_size:)
20   while (chunk = raw.read(chunk_size))
21     compressed = ::Brotli.deflate(chunk)
22     buffer << compressed
23     yield compressed if block_given?
24   end
25 end