SPARK(5)

πŸ“¦ version 1.7.8B2+git20210317.cb30779, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– SPARK(5) β€” the archive file format tea πŸ’–

okay so bestie, this is the manual page for spark, and it's the archive file format for the RISC OS version of the PC archiver Arc. yes it's section 5 of the manual. yes it's a file format. yes we're doing this. grab a snack. πŸ“


🌸 CONVENTIONS 🌸

  • Strings are given in ASCII with C-style escapes. And listen β€” there is no terminating character present unless it's explicitly included. so don't go assuming one, she's not always there πŸ’…
  • Words are 32 bit little-endian numbers.
  • Half words are 16 bit little-endian numbers.

✨ FORMAT ✨

An archive file is literally just a sequence of archive marker, archive header and file data. like:

marker1, header1, data1, marker2, header2, data2, etc.

The archive marker is a single byte of value 0x1a (26). And the archive finishes with an archive marker followed by a zero byte. that's the little goodbye wave πŸ‘‹


πŸ‘‘ Header version number

This tells you how the file data is stored and how many bytes there are in the header. The header version numbers for the PC are detailed below, and an Archimedes header version number is identical to the corresponding PC number except it has bit 7 set. iconic behaviour honestly.

  • 1 β€” Old style, no compression
  • 2 β€” New style, no compression
  • 3 β€” Compression of repeated characters only (RLE)
  • 4 β€” As 3 plus Huffman Squeezing
  • 5 β€” Lempel-Ziv packing of repeated strings (old style)
  • 6 β€” Lempel-Ziv packing of repeated strings (new style)
  • 7 β€” Lempel-Ziv Welch packing with improved hash function
  • 8 β€” Dynamic Lempel-Ziv packing with adaptive reset
  • 9 β€” PKARC style squashing
  • 127 β€” Un*x compression

πŸŽ€ Filename

14 bytes of name, zero terminated. that's it. that's the whole vibe.


πŸ“ Compressed length

Compressed data length, one word.


πŸ¦‹ Date

One half-word, date.

year = (date >> 9) & 0x7f;
month = (date >> 5) & 0x0f;
day = date & 0x1f;

⭐ Time

One half-word, time.

hour = (time >> 11) & 0x1f;
minute = (time >> 5)  & 0x3f;
second = (time & 0x1f) * 2;

The time and date fields are always filled in. If the file has a load and exec address, these are the time and date when the file was added to the archive; otherwise, they are derived from the Archimedes datestamp. And in all extract operations on Archimedes format archives, the contents of the load and exec fields take precedence. periodt.


🌈 CRC

One half-word, Cyclic Redundancy Check. she's checking the vibes (the cyclic redundancy ones).


πŸ”₯ Original file length

Original file length, one word β€” and it's only present if header type is greater than 1. no cap.


πŸ’œ Load address

Load address of the file, one word β€” only present if bit-7 of the header version number is set.


πŸ’œ Exec address

Exec address of the file, one word β€” only present if bit-7 of the header version number is set.


πŸ’œ Attributes

Attributes of the file, one word β€” only present if bit-7 of the header version number is set.


πŸ™ˆ Compressed data...

Directories are stored as non-compressed archives within archives, i.e. their load address & 0xffffff00=0xfffddc. nesting dolls but make it file system.


🌟 COMPATIBILITY 🌟

PC and Archimedes formats may be mixed in one archive for use on the Archimedes. besties coexisting fr fr 🫢


πŸ’« SEE ALSO πŸ’«


and that's the whole page, babe 😭 the bottom of it just says SPARK(5)() all over again with the source/version and date slots sitting there completely empty β€” no version, no date, nothing, she simply refused to fill them in and honestly? respect. mwah πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ‘‘