Re: [PATCH 2/3] sha1_file: add the ability to parse objects in "pack file format"
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 11, 2006, 23:03 UTC
- Message-ID
- <7vejwr3ftl.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0607111449190.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> So if we have a uncompressed header, we'd need to add a separate 2-byte > fingerprint to it _before_ the real header that isn't divisible by 31, and > use that as the thing to test. > > Ho humm. I'll see what I can come up with.
I do not like to rely too heavily on what zlib compression's beginning of stream looks like.
I think the new format can be deflated new header (fully synched) followed by deflated payload.
So the sequence unpack-sha1-header followed by parse-sha1-header would notice we are dealing with new format and reinitialize the deflator at the point where the header deflator left off.
Wouldn't that work?