v0.8.0
Added
setDefaultContentType()declares aDefaultcontent type by extension, so consumers can cover media parts with one declaration instead of anOverrideper part.
Changed
- Breaking: the source package is no longer hashed with SHA-256 when it is opened, and the written output is no longer hashed before it replaces the source. Concurrent-modification checks before lazy reads and saves now rely only on file identity, size, and second-resolution timestamps, which already guarded every read. Lazily opening a 16 MiB package dropped from about 44 ms to under 1 ms, and its copy-through save from about 66 ms to about 23 ms.
- New packages declare
Default Extension="xml"asapplication/xmlalongsiderels, and adding or moving a part whose content type already matches the default for its extension no longer writes anOverride. - Package byte and entry limits are checked against running totals instead of rescanning every entry on each write, so adding 4000 parts dropped from about 360 ms to about 6 ms and part registration is linear again.
- Part-name validation remembers names it already accepted, so building, validating, and saving a 193-part package dropped from about 10.6 ms to about 6.4 ms. The cache is bounded and is reset after 4096 names.
- Saving verifies the written archive by reading back only its structure and
[Content_Types].xml, and reopens the saved package on its first part access instead of immediately, so a package that is saved and released never reads its output back. Validating and saving a 193-part package dropped from about 6.5 ms to about 5.4 ms.
See the full changelog.