Patch Set 2:

I failed to get the infinte loop by truncating one of the 5900 byte long packfiles. At no length did it loop. Did you fix a loop here?

I did complain about the inflate usage in some other piece of code, but that was a different pattern.