[System.IO.Compression] Fixed DeflateStream input stream EOF condition.
authorJoao Matos <joao@tritao.eu>
Thu, 27 Oct 2016 18:45:34 +0000 (19:45 +0100)
committerJoao Matos <joao@tritao.eu>
Thu, 27 Oct 2016 21:01:10 +0000 (22:01 +0100)
commit0b94fdf1d36d923a1f1f5c16f3500a1769228f6e
tree93b74de6ba48af723502d20399ceb6bf0add7b35
parent31f8da0b50460075bb381bcb0d9152cc231faba2
[System.IO.Compression] Fixed DeflateStream input stream EOF condition.

What was happening is that we set the stream EOF flag to true when we
could not read any more input data, and that made us early out before
fully finishing the processing of the compressed data.

Now the only EOF flag is set to true is if zlib's inflate() has actually
finished processing the data.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44994#c2.
mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs
mcs/class/System/Test/compressed.bin [new file with mode: 0644]
support/zlib-helper.c