mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Implement init_huffman.
This commit is contained in:
1 parent
02cd837d9d
commit
f7fb991619
5 files changed
+250
-55
No files matched your search
+11
-6
@@ -105,14 +105,15 @@ typedef int32_t puffs_flate_status;
|
||||
#define PUFFS_FLATE_ERROR_BAD_DISTANCE_CODE_COUNT -1157040128 // 0xbb08f800
|
||||
#define PUFFS_FLATE_ERROR_BAD_FLATE_BLOCK -1157040127 // 0xbb08f801
|
||||
#define PUFFS_FLATE_ERROR_BAD_LITERAL_LENGTH_CODE_COUNT \
|
||||
-1157040126 // 0xbb08f802
|
||||
#define PUFFS_FLATE_ERROR_INCONSISTENT_HUFFMAN_TABLE -1157040125 // 0xbb08f803
|
||||
-1157040126 // 0xbb08f802
|
||||
#define PUFFS_FLATE_ERROR_INCONSISTENT_STORED_BLOCK_LENGTH \
|
||||
-1157040125 // 0xbb08f803
|
||||
#define PUFFS_FLATE_ERROR_INTERNAL_ERROR_INCONSISTENT_INIT_HUFFMAN_STATE \
|
||||
-1157040124 // 0xbb08f804
|
||||
#define PUFFS_FLATE_ERROR_INTERNAL_ERROR_INCONSISTENT_N_BITS \
|
||||
-1157040123 // 0xbb08f805
|
||||
#define PUFFS_FLATE_ERROR_TODO_FIXED_HUFFMAN_BLOCKS -1157040122 // 0xbb08f806
|
||||
#define PUFFS_FLATE_ERROR_TODO_DYNAMIC_HUFFMAN_BLOCKS -1157040121 // 0xbb08f807
|
||||
-1157040123 // 0xbb08f805
|
||||
#define PUFFS_FLATE_ERROR_NO_HUFFMAN_CODES -1157040122 // 0xbb08f806
|
||||
#define PUFFS_FLATE_ERROR_TODO_FIXED_HUFFMAN_BLOCKS -1157040121 // 0xbb08f807
|
||||
|
||||
bool puffs_flate_status_is_error(puffs_flate_status s);
|
||||
|
||||
@@ -132,6 +133,7 @@ typedef struct {
|
||||
// It is a struct, not a struct*, so that it can be stack allocated.
|
||||
struct {
|
||||
uint16_t f_counts[16];
|
||||
uint16_t f_symbols[290];
|
||||
} private_impl;
|
||||
} puffs_flate_huffman_decoder;
|
||||
|
||||
@@ -150,7 +152,7 @@ typedef struct {
|
||||
|
||||
uint32_t f_bits;
|
||||
uint32_t f_n_bits;
|
||||
puffs_flate_huffman_decoder f_huff[2];
|
||||
puffs_flate_huffman_decoder f_huffs[2];
|
||||
uint8_t f_code_lengths[289];
|
||||
uint32_t f_wip0;
|
||||
uint32_t f_wip1;
|
||||
@@ -176,6 +178,9 @@ typedef struct {
|
||||
struct {
|
||||
uint32_t coro_susp_point;
|
||||
uint32_t v_i;
|
||||
uint16_t v_offsets[16];
|
||||
uint16_t v_total;
|
||||
uint16_t v_count;
|
||||
} c_init_huffman[1];
|
||||
} private_impl;
|
||||
} puffs_flate_decoder;
|
||||
|
||||
Reference in new issue
Block a user