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.
1085 1086 1087 |
# File 'lib/td/client/api.rb', line 1085 def gzip @gzip end |
Instance Method Details
#each_fragment(&block) ⇒ Object
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/td/client/api.rb', line 1087 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 |