Patch Set 1:

I suspect the issue is we don't check that the inflater consumed everything in the stream, which means we aren't checking the CRC that is embedded in the compressed data.  The test in question from EGit is chopping off only the last byte of the object file, which is part of the checksum but isn't necessary to inflate the content.

I'll work up a fix for JGit and a test case for this particular issue.  We should always be checking that CRC at the end of the stream.