v05i028: /etc/magic lines for compress

Guy Harris guy at auspex.UUCP
Wed Nov 16 03:46:36 AEST 1988


>>If you have a file(1) compatible with the one in sysVr3
>>adding the following lines to /etc/magic will make it
>>recognize compressed files.
>>
>>0	short		40223		compressed data
>>
>We have SysVr2.2 and the 40223 needed to be changed to 8093 (1F9D hex).

Person "A" had a little-endian machine (40223 is 9D1F hex) and person
"B" had a big-endian machine; the S5 release had nothing to do with it. 

Unfortunately, "strings" in "/etc/magic" cannot, in the standard S5
version, contain C-language escapes, so you can't do this:

	0	string		\037\235	compressed data

which the SunOS version of the S5 'file" supports; this obviates the need
for byte-order-dependent versions of "/etc/magic".

The SunOS version also supports

	>2	byte&0x80	>0		block compressed
	>2	byte&0x1f	x		%d bits

with the "&<mask>" stuff obviating the need for individual entries for
different numbers of bits.

I hope this gets into S5R4 (especially since "compress" presumably will
get into S5R4), but I have no idea if it will.



More information about the Comp.sources.bugs mailing list