]> git.proxmox.com Git - ceph.git/blame - 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
CommitLineData
224ce89b
WB
1#ifndef IGZIP_LEVEL_BUF_STRUCTS_H
2#define IGZIP_LEVEL_BUF_STRUCTS_H
3
f91f0fd5 4#include "igzip_lib.h"
224ce89b
WB
5#include "huff_codes.h"
6#include "encode_df.h"
7
f91f0fd5
TL
8#define MATCH_BUF_SIZE (4 * 1024)
9
10struct hash8k_buf {
11 uint16_t hash_table[IGZIP_HASH8K_HASH_SIZE];
12};
13
14struct hash_hist_buf {
15 uint16_t hash_table[IGZIP_HASH_HIST_SIZE];
16};
17
18struct 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
28struct level_buf {
224ce89b 29 struct hufftables_icf encode_tables;
f91f0fd5 30 struct isal_mod_hist hist;
224ce89b
WB
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;
f91f0fd5
TL
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 };
224ce89b 46};
f91f0fd5 47
224ce89b 48#endif