compression

How do I get Zlib to uncompress from S3 stream in Ruby?

喜欢而已 提交于 2020-12-05 11:09:42
问题 Ruby Zlib::GzipReader should be created passing an IO-like object (must have a read method that behaves same as the IO#read ). My problem is that I can't get this IO-like object from AWS::S3 lib. As far as I know, the only way of having a stream from it is passing a block to S3Object#stream . I already tried: Zlib::GzipReader.new(AWS::S3::S3Object.stream('file', 'bucket')) # Wich gaves me error: undefined method `read' for #<AWS::S3::S3Object::Value:0x000000017cbe78> Does anybody know how can