]> git.proxmox.com Git - ceph.git/blob - ceph/src/isa-l/igzip/igzip_level_buf_structs.h
Import ceph 15.2.8
[ceph.git] / ceph / src / isa-l / igzip / igzip_level_buf_structs.h
1 #ifndef IGZIP_LEVEL_BUF_STRUCTS_H
2 #define IGZIP_LEVEL_BUF_STRUCTS_H
3
4 #include "igzip_lib.h"
5 #include "huff_codes.h"
6 #include "encode_df.h"
7
8 #define MATCH_BUF_SIZE (4 * 1024)
9
10 struct hash8k_buf {
11 uint16_t hash_table[IGZIP_HASH8K_HASH_SIZE];
12 };
13
14 struct hash_hist_buf {
15 uint16_t hash_table[IGZIP_HASH_HIST_SIZE];
16 };
17
18 struct hash_map_buf {
19 uint16_t hash_table[IGZIP_HASH_MAP_HASH_SIZE];
20 struct deflate_icf *matches_next;
21 struct deflate_icf *matches_end;
22 struct deflate_icf matches[MATCH_BUF_SIZE];
23 struct deflate_icf overflow[ISAL_LOOK_AHEAD];
24 };
25
26 #define MAX_LVL_BUF_SIZE sizeof(struct hash_map_buf)
27
28 struct level_buf {
29 struct hufftables_icf encode_tables;
30 struct isal_mod_hist hist;
31 uint32_t deflate_hdr_count;
32 uint32_t deflate_hdr_extra_bits;
33 uint8_t deflate_hdr[ISAL_DEF_MAX_HDR_SIZE];
34 struct deflate_icf *icf_buf_next;
35 uint64_t icf_buf_avail_out;
36 struct deflate_icf *icf_buf_start;
37 union {
38 struct hash8k_buf hash8k;
39 struct hash_hist_buf hash_hist;
40 struct hash_map_buf hash_map;
41
42 struct hash8k_buf lvl1;
43 struct hash_hist_buf lvl2;
44 struct hash_map_buf lvl3;
45 };
46 };
47
48 #endif