2016-10-03 23:50:52 +02:00
|
|
|
#ifndef IGZIP_LEVEL_BUF_STRUCTS_H
|
|
|
|
#define IGZIP_LEVEL_BUF_STRUCTS_H
|
|
|
|
|
2017-06-10 02:03:41 +02:00
|
|
|
#include "igzip_lib.h"
|
2016-10-03 23:50:52 +02:00
|
|
|
#include "huff_codes.h"
|
|
|
|
#include "encode_df.h"
|
|
|
|
|
2017-06-10 02:03:41 +02:00
|
|
|
#define MATCH_BUF_SIZE (4 * 1024)
|
|
|
|
|
2017-12-05 15:43:04 +01:00
|
|
|
struct hash8k_buf {
|
2024-04-19 18:09:21 +02:00
|
|
|
uint16_t hash_table[IGZIP_HASH8K_HASH_SIZE];
|
2017-11-30 17:58:30 +01:00
|
|
|
};
|
|
|
|
|
2017-12-05 15:43:04 +01:00
|
|
|
struct hash_hist_buf {
|
2024-04-19 18:09:21 +02:00
|
|
|
uint16_t hash_table[IGZIP_HASH_HIST_SIZE];
|
2017-12-05 15:43:04 +01:00
|
|
|
};
|
|
|
|
|
2017-11-30 21:07:22 +01:00
|
|
|
struct hash_map_buf {
|
2024-04-19 18:09:21 +02:00
|
|
|
uint16_t hash_table[IGZIP_HASH_MAP_HASH_SIZE];
|
|
|
|
struct deflate_icf *matches_next;
|
|
|
|
struct deflate_icf *matches_end;
|
|
|
|
struct deflate_icf matches[MATCH_BUF_SIZE];
|
|
|
|
struct deflate_icf overflow[ISAL_LOOK_AHEAD];
|
2017-06-10 02:03:41 +02:00
|
|
|
};
|
|
|
|
|
2017-11-30 21:07:22 +01:00
|
|
|
#define MAX_LVL_BUF_SIZE sizeof(struct hash_map_buf)
|
2017-06-10 02:03:41 +02:00
|
|
|
|
|
|
|
struct level_buf {
|
2024-04-19 18:09:21 +02:00
|
|
|
struct hufftables_icf encode_tables;
|
|
|
|
struct isal_mod_hist hist;
|
|
|
|
uint32_t deflate_hdr_count;
|
|
|
|
uint32_t deflate_hdr_extra_bits;
|
|
|
|
uint8_t deflate_hdr[ISAL_DEF_MAX_HDR_SIZE];
|
|
|
|
struct deflate_icf *icf_buf_next;
|
|
|
|
uint64_t icf_buf_avail_out;
|
|
|
|
struct deflate_icf *icf_buf_start;
|
|
|
|
union {
|
|
|
|
struct hash8k_buf hash8k;
|
|
|
|
struct hash_hist_buf hash_hist;
|
|
|
|
struct hash_map_buf hash_map;
|
|
|
|
|
|
|
|
struct hash8k_buf lvl1;
|
|
|
|
struct hash_hist_buf lvl2;
|
|
|
|
struct hash_map_buf lvl3;
|
|
|
|
};
|
2016-10-03 23:50:52 +02:00
|
|
|
};
|
2017-06-10 02:03:41 +02:00
|
|
|
|
2016-10-03 23:50:52 +02:00
|
|
|
#endif
|