source: tags/svn.1.5.4/ARBDB/gb_compress.h

Last change on this file was 6329, checked in by westram, 16 years ago
  • ARBDB enums
    • removed typedefs (enums are already types). fixed type synonyms
    • changed enum values to UPPERCASE
File size: 1.4 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : gb_compress.h                                     //
4//   Purpose   :                                                   //
5//                                                                 //
6//   Institute of Microbiology (Technical University Munich)       //
7//   http://www.arb-home.de/                                       //
8//                                                                 //
9// =============================================================== //
10
11#ifndef GB_COMPRESS_H
12#define GB_COMPRESS_H
13
14#ifndef GB_STORAGE_H
15#include "gb_storage.h"
16#endif
17
18#define GB_COMPRESSION_TAGS_SIZE_MAX 100
19
20enum gb_compress_list_commands {
21    GB_CS_OK   = 0,
22    GB_CS_SUB  = 1,
23    GB_CS_ID   = 2,
24    GB_CS_END  = 3,
25    GB_CD_NODE = 4
26};
27
28struct gb_compress_tree {
29    char              leave;
30    gb_compress_tree *son[2];
31};
32
33struct gb_compress_list {
34    gb_compress_list_commands command;
35
36    int  value;
37    int  bitcnt;
38    int  bits;
39    int  mask;
40    long count;
41
42    gb_compress_list *son[2];
43};
44
45extern int gb_convert_type_2_sizeof[];
46extern int gb_convert_type_2_appendix_size[];
47
48#define GB_UNCOMPRESSED_SIZE(gbd, type) (GB_GETSIZE(gbd) * gb_convert_type_2_sizeof[type] + gb_convert_type_2_appendix_size[type])
49
50#else
51#error gb_compress.h included twice
52#endif // GB_COMPRESS_H
Note: See TracBrowser for help on using the repository browser.