af_archive(5)

πŸ’– af_archive(5) πŸ’–

bestie. sit down. we're reading the File Formats Manual page for af_archive, and honestly? it's giving lore. this is the whole shape of the archive files inside the Attribute Filesystem, and i'm gonna walk you through every single byte-field so you never have to squint at a hex dump alone again 🫢


🌸 NAME 🌸

af_archive β€” the format of archive files in the Attribute Filesystem. that's it, that's the whole job, and it ate πŸ’…


✨ SYNOPSIS ✨

#include <atfs.h>
#include <afsys.h>

two headers, no cap. include them or don't, but that's the vibe 🌈


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie. AtFS archive files are where the data and attributes of non-busy ASOs get stored. and that's not even all of it β€” some attributes of busy ASOs also live in AtFS archive files, and that includes every single user defined attribute. iconic behavior honestly.

AtFS keeps two archive files for every line of development:

  • one to hold the standard- and user defined attributes, and
  • the other to hold the data and change notes.

these files get stored either in a subdirectory named AtFS, or in an explicitly named directory somewhere in your file system. wherever you want, queen. the two archive files are named:

Attr/<filename>          (attributes) and
Data/<filename>          (data).

this manual is a short, exemplary walkthrough of the archive structure β€” not the whole novel, just the tour. also, heads up: all data in AtFS-archives is stored as ASCII-strings. the archives are full of keywords and keyletters, and in the description below those get set in boldface ✨ (i'm keeping the vibes, just imagine the ^B bits glowing). and anything written like <field>? that's a placeholder telling you what that field is for. slay.

here's the structure β€” attributes file first, bestie, because we do things in order πŸŽ€

πŸŽ€ the attributes file πŸŽ€

the header, ...

^BARHD   <archive_format_version>   <no_of_revisions>   <size_of_data>

... the name ..

^BI   <hostname>   <path>   <name>   <type>   <variant(unused)>

... and the owner ..

^BO   <owner's_name>   <owner's_host>   <owner's_domain>

... followed by some attributes for the busy version ...

^BP   <gen_>   <rev_of_physical_predecessor>
^BL   <locker's_name>   <locker's_host>   <locker's_domain>   <date_of_last_lock_change>

... and the revision list, that contains all standard attributes for non-busy versions. ...

^BR   <generation>   <revision>   <state>   <mode>   <variant(unused)>
     ^BA   <author's_name>   <_host>   <_domain>   <locker's_name>   <_host>   <_domain>
     ^BT   <date_of_last_modification>   <_last_access>   <_last_status_change>   ...
                                 ...   <_saving>   <_locking>
     ^BM   <kind_of_representation>   <size_of_file>   <size_of_delta>   ...
               ...   <gen_>   <rev_of_phys._successor>   <gen_>   <rev_of_phys._predecessor>
^BR ...
^BR ...

... Now follows the list of lists of user defined attributes ("-2 -2" indicates the busy version; "@" stands for a null byte). ...

^BUSEG
^BU -2 -2
machine=vax@data=fs@@
^BU   <gen>   <rev>
name=value@@
^BU ...

πŸ¦„ the data file πŸ¦„

the structure of the datafile: data are represented either by deltas or by complete data-chunks... both options, no gatekeeping πŸ”₯

^BDATA   <archive_format_version>

^BN   <gen>   <rev>   <size_of_note>
--- empty log message ---

^BD   <gen>   <rev>   <kind_of_representation>   <size_of_data>
A typical delta looks like:
@67723@@@@44@67756@^A14@some text@6635@ and so on.
Deltas are indicated by a "1" at the "kind_of_representation" field.

^BN   <gen>   <rev>   <size_of_note>
This is a log message

^BD   <gen>   <rev>   <kind_of_representation>   <size_of_data>
A "0" at the "kind_of_representation" field indicates that this
version is stored completely.

^BN ...

^BD ...
lowkey obsessed with the fact that a "1" at the "kind_of_representation" field means delta, and a "0" means the version is stored completely. that's the whole trick. iykyk πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Andreas Lampen, Tech. Univ. Berlin (andy@cs.tu-berlin.de)


and that's the page, bestie!! πŸ’œ this one's dated 12.10.126 and it's the af_archive(5) girlie through and through β€” go forth and read your archives like the main character you are πŸŒŸπŸ’–