xref: /freebsd/contrib/file/magic/Magdir/aria (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1
2#------------------------------------------------------------------------------
3# URL: 		https://de.wikipedia.org/wiki/Aria_(Software)
4# Reference:	https://github.com/aria2/aria2/blob/master/doc/manual-src/en/technical-notes.rst
5# From:		Joerg Jenderek
6# Note:		only version 1 suited
7# check for valid version one
80		beshort		0x0001
9# skip most uncompressed DEGAS med-res bitmap *.PI2 and GEM bitmap (v1) *.IMG
10# by test for valid infoHashCheck extension
11>2		ubelong&0xffFFffFE	0x00000000
12# skip DEGAS med-res bitmap DIAGRAM1.PI2 by test for valid length of download
13>>(6.L+14)	ubequad			>0
14>>>0	use     aria
150	name	aria
16# version; (0x0000) or (0x0001); for 0 all multi-byte are in host byte order. For 1 big endian
17>0	beshort		x	aria2 control file, version %u
18#!:mime	application/octet-stream
19!:mime	application/x-aria
20!:ext	aria2
21# EXTension; if EXT[3]&1 == 1 checks whether saved InfoHash and current downloading the same; infoHashCheck extension
22>2		ubelong		!0	\b, infoHashCheck %#x
23# info hash length like: 0 14h
24>6		ubelong		!0	\b, %#x bytes info hash
25# info hash; BitTorrent InfoHash
26>>10		ubequad		x	%#16.16llx...
27# piece length; the length of the piece like: 400h 100000h
28>(6.L+10)	ubelong		x	\b, piece length 0x%x
29# total length; the total length of the download
30>(6.L+14)	ubequad		x	\b, total length %llu
31#>(6.L+14)	ubequad		x	\b, total length %#llx
32# upload length; the uploaded length of download like: 0 400h
33>(6.L+22)	ubequad		!0	\b, upload length %#llx
34# bitfield length; the length of bitfield like: 4 6 Ah 10h 13h 167h
35>(6.L+30)	ubelong		x	\b, %#x bytes bitfield
36# bitfield; bitfield which represents current download progress
37>(6.L+34)	ubequad		!0	%#llx...
38
39