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.
1316 1317 1318 |
# File 'lib/td/client/api.rb', line 1316 def gzip @gzip end |
Instance Method Details
#each_fragment(&block) ⇒ Object
1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 |
# File 'lib/td/client/api.rb', line 1318 def each_fragment(&block) if @gzip infl = Zlib::Inflate.new(Zlib::MAX_WBITS+16) else infl = Zlib::Inflate.new end begin read_body do |fragment| block.call infl.inflate(fragment) end ensure infl.close end nil end |