Module: TreasureData::API::DeflateReadBodyMixin
- Defined in:
- lib/td/client/api.rb
Instance Attribute Summary collapse
-
#gzip ⇒ Object
Returns the value of attribute gzip.
Instance Method Summary collapse
Instance Attribute Details
#gzip ⇒ Object
Returns the value of attribute gzip.
243 244 245 |
# File 'lib/td/client/api.rb', line 243 def gzip @gzip end |
Instance Method Details
#each_fragment {|fragment| ... } ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/td/client/api.rb', line 246 def each_fragment(&block) if @gzip infl = Zlib::Inflate.new(Zlib::MAX_WBITS + 16) else infl = Zlib::Inflate.new end begin read_body {|fragment| block.call infl.inflate(fragment) } ensure infl.close end nil end |