8000 RFC-9 Review 3: Fix mutability response (cross-reference, central directory order, padding) · Issue #81 · jwindhager/ngff · GitHub
[go: up one dir, main page]

Skip to content

RFC-9 Review 3: Fix mutability response (cross-reference, central directory order, padding) #81

Open

Description

@jwindhager

Follow-up to #6.

The response to Review 3 (Requirements > Mutability) says:

We agree with the reviewer's observation that mutation has costs (a rewritten central directory, orphaned entries, and a possibly spoiled "zarr.json first" ordering, see the Drawbacks section), and we have not adopted mitigations such as a padded header, in order to keep the format compatible with general-purpose ZIP libraries.

Three issues:

  1. Wrong cross-reference. The Drawbacks section does not discuss a spoiled zarr.json-first ordering. The relevant text is in the description of jsonFirst ("a writer that modifies an archive SHOULD ensure that the flags in the archive comment are consistent with the order of the central directory").
  2. Undersells the change made for Comment 4 (Responses on central directory ordering (#13, #15, #23) [stacked on #47] #48). The reviewer's scenario was that rewriting zarr.json orphans the entry at the head of the file and appends the new version at the tail, "spoiling the file's 'zarr.json files come first' recommendation". Since Responses on central directory ordering (#13, #15, #23) [stacked on #47] #48, the recommendation concerns only the order of the central directory records, not of the entries, and the central directory is rewritten on every append. A rewritten zarr.json therefore does not break jsonFirst if the writer puts the central directory in order at the end of the writing session. This is the most direct answer to the reviewer's concern and should be stated.
  3. Padding wording. "We have not adopted mitigations such as a padded header" reads as a rejection, while Drawbacks ("Updating an entry in place is generally not supported by ZIP libraries") describes padding by alignment/padding extra fields or by unused space between entries as permitted. Better: padding is permitted but not specified or required, to keep the format compatible with general-purpose ZIP libraries.

To do

  • Fix the cross-reference (point to the jsonFirst description and/or Access and mutability).
  • Add that the zarr.json-first recommendation now concerns only the central directory, so in-place metadata updates do not spoil it if the central directory is reordered at the end of the writing session.
  • Reword the padding sentence as "permitted, not specified".
  • Keep consistent with the outcome of MUST 8 (first local file header at offset 0): text and check_ozx.py disagree after an in-place edit #77 (MUST 8 after an in-place edit), which affects whether the root zarr.json can be rewritten without a repack.

Related: #70, #77.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0