aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-12-18 14:59:06 -0500
committerB. Watson <urchlay@slackware.uk>2025-12-18 14:59:06 -0500
commitd2694e5095ddbe3cd84034a4e5325f5e0fac966f (patch)
treebff1d668bac0f9a29df6f2a54aa2fb4151e51e2e
parenta81aebb7bce030b3b9d49b982f327cfac971369e (diff)
downloadalftools-d2694e5095ddbe3cd84034a4e5325f5e0fac966f.tar.gz
Update magic.
-rw-r--r--magic/alf21
1 files changed, 13 insertions, 8 deletions
diff --git a/magic/alf b/magic/alf
index bfa8556..024b519 100644
--- a/magic/alf
+++ b/magic/alf
@@ -1,8 +1,7 @@
### AlfCrunch
-# Author: B. Watson (urchlay@slackware.uk)
-#
# Reference:
# https://slackware.uk/~urchlay/repos/alftools/plain/doc/fileformat.txt
+# https://slackware.uk/~urchlay/repos/alftools/plain/doc/compression.txt
#
# This is very similar to ARC (see Magdir/archive), but doesn't
# overlap with it. The . in the filename is always present, even
@@ -10,16 +9,22 @@
#
# Offsets 18 and 28 are the high bytes of the 32-bit original and
# compressed sizes. These will always be 0, since Atari files are
-# never >16MB in size (and since the UNALF dearchiver can't handle
-# them anyway).
+# never >16MB in size (and since LZ.COM and DZ.COM can't create or
+# extract them anyway).
+#
+# Offset 29 is the first byte of the compressed stream. It will always
+# be 0x80, because the stream always starts with a 9-bit "reset" code
+# (for normal files), or an "end" code (for 0-byte files). Either way,
+# the high 8 bits of the code are 0x80.
#
-# magicbits=53.7
+# magicbits=61.7
#
0 uleshort 0x0f1a
>18 ubyte 0x00
>>28 ubyte 0x00
->>>2 regex/13 [A-Z][A-Z0-9@_]{0,7}\.[A-Z0-9@_]{0,3}
->>>>&0 ubyte 0
->>>>>2 string x Atari 8-bit AlfCrunch data, first filename %s
+>>>29 ubyte 0x80
+>>>>2 regex/13 [A-Z][A-Z0-9@_]{0,7}\.[A-Z0-9@_]{0,3}
+>>>>>&0 ubyte 0
+>>>>>>2 string x Atari 8-bit AlfCrunch data, first filename %s
!:mime application/x-atari-8bit-alfcrunch
!:ext alf