You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! This is a bug report that can be reproduced as follows:
a ZIP file contains several files in a subdirectory, one of them being an xlsx file
the ZIP is downloaded via Ruby Net::SFTP and stored in a buffer (using buff = sftp.file.open(path, 'r', &:read))
the buff is then given to Zip::File.open_buffer(buff)
attempt to extract or get_input_stream.read on the xlsx file from the ZIP results in:
Zip::DecompressionError: zlib error while inflating
from /app/vendor/bundle/gems/rubyzip-2.3.0/lib/zip/inflater.rb:41:in `rescue in produce_input'
Caused by Zlib::DataError: invalid stored block lengths
from /app/vendor/bundle/gems/rubyzip-2.3.0/lib/zip/inflater.rb:33:in `inflate'
Reproduced in rubyzip 2.0.0 and 2.3.0. Note that the error does not occur if open instead of open_buff is used.