File: gb_compress.h

package info (click to toggle)
arb 6.0.2-1%2Bdeb8u1
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie
  • size: 65,916 kB
  • ctags: 53,258
  • sloc: ansic: 394,903; cpp: 250,252; makefile: 19,620; sh: 15,878; perl: 10,461; fortran: 6,019; ruby: 683; xml: 503; python: 53; awk: 32
file content (54 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// =============================================================== //
//                                                                 //
//   File      : gb_compress.h                                     //
//   Purpose   :                                                   //
//                                                                 //
//   Institute of Microbiology (Technical University Munich)       //
//   http://www.arb-home.de/                                       //
//                                                                 //
// =============================================================== //

#ifndef GB_COMPRESS_H
#define GB_COMPRESS_H

#ifndef GB_STORAGE_H
#include "gb_storage.h"
#endif

#define GB_COMPRESSION_TAGS_SIZE_MAX 100

enum gb_compress_list_commands {
    GB_CS_OK   = 0,
    GB_CS_SUB  = 1,
    GB_CS_ID   = 2,
    GB_CS_END  = 3,
    GB_CD_NODE = 4
};

struct gb_compress_tree {
    char              leaf;
    gb_compress_tree *son[2];
};

struct gb_compress_list {
    gb_compress_list_commands command;

    int  value;
    int  bitcnt;
    int  bits;
    int  mask;
    long count;

    gb_compress_list *son[2];
};

extern int gb_convert_type_2_sizeof[];
extern int gb_convert_type_2_appendix_size[];

inline size_t GBENTRY::uncompressed_size() const {
    return size() * gb_convert_type_2_sizeof[type()] + gb_convert_type_2_appendix_size[type()];
}

#else
#error gb_compress.h included twice
#endif // GB_COMPRESS_H