1 /* Copyright (C) 2007  John Whitney
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; version 2 of the License.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * Author: John Whitney <jjw@deltup.org>
13  */
14 
15 //define recognized filetypes
16 const unsigned
17   UNKNOWN_FMT	= 0,
18   BZIP2		= 1,
19   GZIP		= 2,
20   ZIP		= 3,
21   COMPRESS	= 4,
22   TARBALL	= 5,
23   DTU		= 6,
24 
25   BZIP2_OLD	= 7, // Depricated - now using sub-filetypes
26   XDELTA	= 8,
27   BDELTA	= 9;
28 
29 // define recognized sub-filetypes
30  //0 < v. 1.0.0 - openoffice 1.0.2 & 1.0.3 use this
31  //1 < v. 1.0.3
32  //2 = v. 1.0.3
33  //3 = v. 1.0.4
34 
35 // the high flag bits are interleaved between
36 // compressor_tested and compressor_verified
compressor_tested_bit(int compress_ver)37 inline unsigned compressor_tested_bit(int compress_ver) {
38   return ((unsigned)1 << 31 >> (compress_ver*2));
39 }
40 
compressor_verified_bit(int compress_ver)41 inline unsigned compressor_verified_bit(int compress_ver) {
42   return ((unsigned)1 << 30 >> (compress_ver*2));
43 }
44