git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Java Inflater problem decompressing packfile

From
Jeff King <peff@peff.net>
Date
Apr 16, 2011, 06:37 UTC
Message-ID
<20110416063729.GC28853@sigill.intra.peff.net>
In-Reply-To
<1302919505984-6278154.post@n2.nabble.com>
On Fri, Apr 15, 2011 at 07:05:05PM -0700, madmarcos wrote:
Show 11 quoted lines
> So, my inflater method decompresses the first 7 objects fine (a commit, a
> couple of trees, and several blobs) and a cursory visual inspection of the
> decompressed data seems fine. The eighth object becomes a problem, though.
> It is a blob with the name build.xml that is 51,060 bytes decompressed
> (looking at the original pre-git-pushed jEdit source). The actual file size
> matches the decompressed data content size in the packfile object header. 
> The inflater procedure outputs the decompressed data to System.out for
> visual inspection. Approximately the first 1/3 looks like the original
> build.xml but after that, the output is garbled. The procedure continues
> decompressing objects after the 8th, but garbled, object but it dies on the
> 9th object with an "unknown compression method" error.

Is it possible that the blob is stored as a delta within the pack? In that case the pack header will tell you what the eventual size of the blob will be, but the data will actually be a diff against another pack object. Does your inflater handle delta-fied objects?

-Peff
Previous: madmarcosNext: madmarcos
Message 2 of 10 in “Java Inflater problem decompressing packfile”
  1. madmarcosApr 16, 2011
  2. Jeff KingApr 16, 2011
  3. madmarcosApr 16, 2011
  4. madmarcosApr 16, 2011
  5. madmarcosApr 16, 2011
  6. madmarcosApr 16, 2011
  7. madmarcosApr 17, 2011
  8. madmarcosApr 17, 2011
  9. madmarcosApr 17, 2011
  10. Jeff KingApr 17, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.