[File-cvs] CVS commit: file/magic/Magdir

Christos Zoulas christos at zoulas.com
Fri Nov 9 17:58:28 UTC 2018


Module Name:	file
Committed By:	christos
Date:		Fri Nov  9 17:58:28 UTC 2018

Modified Files:
	file/magic/Magdir: archive

Log Message:
>From Michal:

The most correct way to detect the format would probably be to first
check for 'STOP' at the end, read the unsigned long preceding it and use
it as (negative) offset from end of file where 'XPAKPACK' is to be
found.  However, file does not seem to support that kind of lookup.

Therefore, I went for the second best thing and checking for additional
'XPAKSTOP' terminating the metadata blob.

Technically, the information could be usefully amended by stating
the compression used.  However, it seems that positive offsets following
negative offsets do not work, and reversing the logic would require
a lot of repetition, so I presumed it's not worth the effort.
You can view, comment on, or merge this pull request online at:

[This note is for me to fix positive offset from starting from negative
offsets.]


To generate a diff of this commit:
cvs rdiff -r1.119 -r1.120 file/magic/Magdir/archive

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



More information about the File-cvs mailing list