Module-file format (DRAFT)
Mark Reinhold
mr at sun.com
Tue Jan 19 21:07:06 PST 2010
> Date: Tue, 19 Jan 2010 17:51:15 -0500
> From: roger.riggs at sun.com
> Do I read this correctly that compression is only file-by-file
> (SectionFileHeader)? Frequently compression algorithms work better
> with more content to compress. But perhaps I don't understand what
> goes into a "CLASSES" section. Is it assumed to be a sequence of
> classfiles without names?
As Dalibor said, it's a pack.gz stream of the module's classes.
> A description of the allowed ordering or nesting would be useful (BNF).
I'll consider that (though it's pretty trivial).
> It would be useful if the HashSection was allowed to be in each section
> as well as the entire file and was required to be after the
> ModuleFileHeader or SectionHeader. Then an implementation could verify
> that the module or section had the expected data before reading it.
You really mean, "had the expected data before using that data", right?
I agree, especially for the module-info section since that will often be
read and interpreted independently of the rest of the stream.
> The would be useful when verifying signatures.
Right.
> There is no benefit to putting the hash at the end of the file because
> the format requires all of the compression to be done before any of the
> sections can be written.
Not sure I see your point. The end of the stream is the most convenient
location for both writers and readers, though obviously the overall hash
could be placed earlier in the stream.
- Mark
More information about the jigsaw-dev
mailing list