Skip to content

refactor: rename EntryMeta.offset to file_offset - #98

Merged
blocksmith314 merged 1 commit into
mainfrom
refactor/78-entry-file-offset
Nov 24, 2026
Merged

blocksmith314 merged 1 commit into
mainfrom
refactor/78-entry-file-offset

Conversation

@blocksmith314

Copy link
Copy Markdown
Owner

Summary

  • Rename EntryMeta::offset to EntryMeta::file_offset across the encoder, decoder, TSV output, the reader cross-check and tests.
  • Correct doc/file_format.md and the Chinese translation: the field is an absolute archive offset, the locating recipe uses it directly, and the block-relative offset is DataBlockMeta.file_offsets[i].
  • Document that dump's offset column reports the absolute value and ls does not display it.
  • The serialized layout is unchanged (the same 8 bytes at the same position); no format version bump, and existing archives remain compatible.

Tests

  • Release ctest: 178/178 passed
  • ASan ctest: 178/178 passed

Performance gate

Against origin/main (16a7965): pack +0.7% wall time / -0.2% peak RSS; unpack -5.0% wall time / -1.3% peak RSS. No regression.

Closes #78

The field is an absolute archive offset, not a block-relative one. Rename it to make the distinction from DataBlockMeta.file_offsets explicit, and correct the format docs: the field description, the file-locating recipe and the reader validation contract now state the absolute semantics.

The serialized layout is unchanged (the same 8 bytes at the same position), so no format version bump is needed and existing archives remain compatible.

Closes #78
@blocksmith314
blocksmith314 merged commit a6f9634 into main Nov 24, 2026
9 of 10 checks passed
@blocksmith314
blocksmith314 deleted the refactor/78-entry-file-offset branch November 24, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: file_format.md/CN describe entry_meta.offset with the wrong semantics

1 participant