Skip to main content

Module file_format

Module file_format 

Source
Expand description

File format specifications for 20-year compatibility.

Sisters use their OWN binary file headers (AMEM, AVIS, ACDB, ATIM) or JSON (Identity). This module provides traits and utilities that unify file format operations without forcing a single header layout.

§The 20-Year Promise

Any .a* file created today will be readable in 2046.

§Reality (v0.2.0)

Each sister has its own header format:

  • Memory: “AMEM” magic, 64-byte header
  • Vision: “AVIS” magic, 64-byte header
  • Codebase: “ACDB” magic, 128-byte header
  • Time: “ATIM” magic, 92-byte header
  • Identity: JSON files (no binary header)

The v0.1.0 SisterFileHeader (96-byte “AGNT” magic) was never adopted. v0.2.0 replaces it with a trait-based approach that each sister implements according to its actual format.

Structs§

FileInfo
Information about a file (without loading full content).
VersionCompatibility
Version compatibility rules.

Traits§

FileFormatReader
File format reader trait for all sisters.
FileFormatWriter
File format writer trait for all sisters

Functions§

identify_sister_by_magic
Helper: Identify which sister a file belongs to by magic bytes.
is_json_format
Helper: Check if a file is a JSON-based sister format (e.g., Identity .aid files).
read_magic_bytes
Helper: Read 4-byte magic from a file path.