I've written a small groovy utility that can unzip git blob objects and it works, I can see the content of the blobs. The same works for the commits.
The problem is in trees. When I unpack them, I get:
tree 29100644 a�⛲��CK�)�wZ���S�
. As you can see after the object size it's impossible to read the content. It looks like this content is kept in a different format.
Here is my code:
ByteArrayOutputStream result = new ByteArrayOutputStream()
InflaterOutputStream byteWriter = new InflaterOutputStream(result)
byteWriter.write(new File(input).bytes)
byteWriter.close()
println result
Tried similar things in Ruby and the result was the same. So I think the problem is in the format of the file which is not Zlibbed.