[File] [PATCH] of Magdir/archive for FTCOMP compressed

Jörg Jenderek joerg.jen.der.ek at gmx.net
Thu Apr 8 23:41:56 UTC 2021


Hello,
some days ago i handled some OS/2 disks. There i found some files
with DLL and DRV file name extension. These are typical used for
dynamic linked libraries and device drivers. But when in run file
command version 5.40 on such OS/2 files and related examples i get an
output like:

8514.DRV:     data
EGAMONO.DRV:  data
install.in_:  data
KBDFR.DLL:    data
KBDPO.DLL:    data
KBDUS.DLL:    data
LANGDUT.DLL:  data
LANGENG.DLL:  data
LANGFRN.DLL:  data
LANGPOL.DLL:  data
MAHJONGG.EX@: data
MAHJONGG.HL@: data
MAHTILE7.TI@: data
MAHTILE@:     data
os2drv.pk2:   data
PMSPL20.DLL:  data
seahaven.ex_: data
seahaven.hl_: data
UNPACK:       data
UNPACK.EXE:   MS-DOS executable, NE for OS/2 1.x (EXE)

Some are not recognised. For comparison reason i run the file format
identification utility TrID ( See
https://mark0.net/soft-trid-e.html). This describes the "data"
examples as "FTCOMP compressed archive" by definition
ark-ftcomp.trid.xml (See appended ftcomp-trid-v.txt.gz)

On file formats archive team web site exist a page about FTCOMP. This
is now expressed inside Magdir/archive by additional comment lines like
  # URL:		http://fileformats.archiveteam.org/wiki/FTCOMP
  # Reference: http://mark0.net/download/triddefs_xml.7z/
  # defs/a/ark-ftcomp.trid.xml

This is neither an official nor a complete documentation. According
to that site such samples start with 4 byte sequence A596FDFF, but
according to TrID the 6 byte string FTCOMP" always appear at same
offset 41. So i choose this as test line, which looks like
  24	string/b	FTCOMP		FTCOMP compressed archive
  !:mime	application/x-compress-ftcomp

Instead of generic mime type application/octet-stream i show an user
defined one.
Some bytes after the FTCOMP string i saw another string which is
apparently the original file name with directory ( like
\OS2\unpack.exe \SYSTEM\8514.DRV MAHJONGG.EXE). So show this
information by line like:
  >41	string		x		"%s"

Apparently the archive name is generated by taking the last character
of the original file name extension and replace it with a underscore
("_" like in seahaven.hl_ from seahaven.hlp) or at character ("@"
like in MAHJONGG.EX@ from MAHJONGG.EXE). These extensions are
mentioned on web site. This behaviour also appears for MS Compress
archive. So i put my lines afterwards in Magdir/archive.
But i also found FTCOMP compressed examples without file name
extension ( like MAHTILE@ or UNPACK) or with PK2 extension like in
os2drv.pk2 where archive names have no such strong relation to
original file name.
And i also found examples where archive name is like the original
library or driver name like in examples KBDFR.DLL or 8514.DRV.
That is obviously irritating for users. So all these file name
extensions are shown by line like:
  !:ext	??_/??@/dll/drv/pk2/

After applying the above mentioned modifications by patch
file-5.40-archive-ftcomp.diff then such compressed files are
are now described like:

8514.DRV:     FTCOMP compressed archive "\SYSTEM\8514.DRV"
EGAMONO.DRV:  FTCOMP compressed archive "\SYSTEM\EGAMONO.DRV"
install.in_:  FTCOMP compressed archive "EPFinsts.exe"
KBDFR.DLL:    FTCOMP compressed archive "\SYSTEM\KBDFR.DLL"
KBDPO.DLL:    FTCOMP compressed archive "\SYSTEM\KBDPO.DLL"
KBDUS.DLL:    FTCOMP compressed archive "\SYSTEM\KBDUS.DLL"
LANGDUT.DLL:  FTCOMP compressed archive "\SYSTEM\LANGDUT.DLL"
LANGENG.DLL:  FTCOMP compressed archive "\SYSTEM\LANGENG.DLL"
LANGFRN.DLL:  FTCOMP compressed archive "\SYSTEM\LANGFRN.DLL"
LANGPOL.DLL:  FTCOMP compressed archive "\SYSTEM\LANGPOL.DLL"
MAHJONGG.EX@: FTCOMP compressed archive "MAHJONGG.EXE"
MAHJONGG.HL@: FTCOMP compressed archive "MAHJONGG.HLP"
MAHTILE7.TI@: FTCOMP compressed archive "MAHTILE7.til"
MAHTILE@:     FTCOMP compressed archive "12.ICO"
os2drv.pk2:   FTCOMP compressed archive "\os2\dll\bvhsvga.dll"
PMSPL20.DLL:  FTCOMP compressed archive "\SYSTEM\PMSPL20.DLL"
seahaven.ex_: FTCOMP compressed archive "seahaven.exe"
seahaven.hl_: FTCOMP compressed archive "seahaven.HLP"
UNPACK:       FTCOMP compressed archive "\OS2\unpack.exe"
UNPACK.EXE:   MS-DOS executable, NE for OS/2 1.x (EXE)

I hope my diff file can be applied in future version of
file utility.

With best wishes
Jörg Jenderek
--
Jörg Jenderek





















-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftcomp-trid-v.txt.gz
Type: application/x-gzip
Size: 607 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20210409/4ec6c6a2/attachment.bin>
-------------- next part --------------
--- file-5.40/magic/Magdir/archive.old	2021-02-22 23:49:24 +0000
+++ file-5.40/magic/Magdir/archive	2021-04-07 13:22:43 +0000
@@ -618,6 +618,21 @@
 !:ext	??$
 >>8	ulelong	>0		\b, original size: %u bytes
 
+# Summary:	FTCOMP compressed archive
+# From:		Joerg Jenderek
+# URL:		http://fileformats.archiveteam.org/wiki/FTCOMP
+# Reference:    http://mark0.net/download/triddefs_xml.7z/defs/a/ark-ftcomp.trid.xml
+# Note:		called by TrID "FTCOMP compressed archive"
+#		extracted by `unpack seahelp.hl_`
+24	string/b	FTCOMP		FTCOMP compressed archive
+#!:mime	application/octet-stream
+!:mime	application/x-compress-ftcomp
+!:ext	??_/??@/dll/drv/pk2/
+# probably A596FDFF magic at the beginning
+>0	ubelong		!0xA596FDFF	\b, at beginning 0x%x
+# probably orginal file name with directory like: \OS2\unpack.exe \SYSTEM\8514.DRV MAHJONGG.EXE
+>41	string		x		"%s"
+
 # MP3 (archiver, not lossy audio compression)
 0	string	MP3\x1a MP3-Archiver archive data
 # ZET
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.40-archive-ftcomp.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20210409/4ec6c6a2/attachment.obj>


More information about the File mailing list