mirror of
https://github.com/intel/isa-l.git
synced 2024-12-12 17:33:50 +01:00
8965584ae3
Move current level 2 compression to be level 3 and create a level 2 compression which is the same algorithm as level 1 but with a larger hashtable. Change-Id: I398a6017c2ff218dded24e229fb51c23ea69f314 Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
#ifndef IGZIP_LEVEL_BUF_STRUCTS_H
|
|
#define IGZIP_LEVEL_BUF_STRUCTS_H
|
|
|
|
#include "igzip_lib.h"
|
|
#include "huff_codes.h"
|
|
#include "encode_df.h"
|
|
|
|
#define MATCH_BUF_SIZE (4 * 1024)
|
|
|
|
struct hash8k_buf {
|
|
uint16_t hash_table[IGZIP_HASH8K_HASH_SIZE];
|
|
};
|
|
|
|
struct hash_hist_buf {
|
|
uint16_t hash_table[IGZIP_HASH_HIST_SIZE];
|
|
};
|
|
|
|
struct hash_map_buf {
|
|
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];
|
|
};
|
|
|
|
#define MAX_LVL_BUF_SIZE sizeof(struct hash_map_buf)
|
|
|
|
struct level_buf {
|
|
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;
|
|
};
|
|
};
|
|
|
|
#endif
|