Bug 519534 - Define "archives" and "zip" content-types
Summary: Define "archives" and "zip" content-types
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks: 106832
  Show dependency tree
 
Reported: 2017-07-12 05:19 EDT by Mickael Istria CLA
Modified: 2017-07-12 07:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2017-07-12 05:19:19 EDT
Archive files  such as zip or tar.gz are pretty common formats used by developers and more, and also by many programming languages that ship some artifacts as relabeled common archive types. We should add a content-type definition for them out-of-the-box.

From bug 106832:
'''
According to the ZIP specification, a ZIP file starts with: central a 4 byte signature: (0x02014b50). To support a ZIP content type, it would be just a matter of declaring it associated to the "zip" extension and using a BinarySignatureContentDescriber with the given signature.

A JAR content type could be declared (by JDT?) as a sub content type of the ZIP content type contributed by Runtime that just associates it to the "jar" extension. This would preclude JAR files that have the "zip" extension, but I think this might be good enough. Doing better than that would require further analysis of the ZIP contents, a price the content description mechanism can't afford to pay (not to mention manifests are optional, so JAR files are basically ZIP files that *we know* contain Java classes and resources in them).
'''