Buffer error when inflating compressed data with Zlib
I tried to google a solution for this issue, but no luck at all.
How to reproduce:
zs = Zlib::Inflate.new
contents = File.read("tzlib-clean.txt")
res = zs.inflate(contents)
zs.finish if zs
This code will raise a Zlib::BufError exception.
I expect that this code will successfully uncompress the zlib compressed data in the file.
I don't know how to provide a debugger backtrace, but I will gladly do so if someone explains that to me.