According to documentation on Stream class, the Read method should return 0 if the end of the stream has been reached, and there's no single mention of -1 possibility. But BZip2InputStream returns -1 if EOF is encountered.
This breaks some code relying on 0 as the EOF. I believe that Stream.CopyTo(...) will break as it checks for 0 as EOF.
This breaks some code relying on 0 as the EOF. I believe that Stream.CopyTo(...) will break as it checks for 0 as EOF.