MeterLogger
|
Go to the source code of this file.
Data Structures | |
struct | output_info |
Macros | |
#define | LOG(...) /* no-op */ |
#define | ASSERT(X) /* no-op */ |
#define | NO_BITS ((uint32_t)-1) |
#define | BACKREF_COUNT_BITS(HSD) (HEATSHRINK_DECODER_LOOKAHEAD_BITS(HSD)) |
#define | BACKREF_INDEX_BITS(HSD) (HEATSHRINK_DECODER_WINDOW_BITS(HSD)) |
#define ASSERT | ( | X | ) | /* no-op */ |
Definition at line 35 of file heatshrink_decoder.c.
Referenced by st_backref_count_msb(), st_backref_index_msb(), and st_yield_backref().
#define BACKREF_COUNT_BITS | ( | HSD | ) | (HEATSHRINK_DECODER_LOOKAHEAD_BITS(HSD)) |
Definition at line 128 of file heatshrink_decoder.c.
Referenced by st_backref_count_lsb(), st_backref_count_msb(), st_backref_index_lsb(), and st_yield_backref().
#define BACKREF_INDEX_BITS | ( | HSD | ) | (HEATSHRINK_DECODER_WINDOW_BITS(HSD)) |
Definition at line 129 of file heatshrink_decoder.c.
Referenced by st_backref_index_lsb(), and st_backref_index_msb().
#define LOG | ( | ... | ) | /* no-op */ |
Definition at line 34 of file heatshrink_decoder.c.
Referenced by get_bits(), heatshrink_decoder_alloc(), heatshrink_decoder_poll(), heatshrink_decoder_sink(), push_byte(), st_backref_count_lsb(), st_backref_count_msb(), st_backref_index_lsb(), st_backref_index_msb(), st_yield_backref(), and st_yield_literal().
#define NO_BITS ((uint32_t)-1) |
Definition at line 44 of file heatshrink_decoder.c.
Referenced by get_bits(), st_backref_count_lsb(), st_backref_count_msb(), st_backref_index_lsb(), st_backref_index_msb(), and st_yield_literal().
enum HSD_state |
Enumerator | |
---|---|
HSDS_EMPTY | |
HSDS_INPUT_AVAILABLE | |
HSDS_YIELD_LITERAL | |
HSDS_BACKREF_INDEX_MSB | |
HSDS_BACKREF_INDEX_LSB | |
HSDS_BACKREF_COUNT_MSB | |
HSDS_BACKREF_COUNT_LSB | |
HSDS_YIELD_BACKREF | |
HSDS_CHECK_FOR_MORE_INPUT |
Definition at line 6 of file heatshrink_decoder.c.
|
static |
Definition at line 305 of file heatshrink_decoder.c.
References heatshrink_decoder::bit_accumulator, heatshrink_decoder::bit_index, heatshrink_decoder::buffers, heatshrink_decoder::current_byte, heatshrink_decoder::input_index, heatshrink_decoder::input_size, LOG, and NO_BITS.
Referenced by st_backref_count_lsb(), st_backref_count_msb(), st_backref_index_lsb(), st_backref_index_msb(), st_input_available(), and st_yield_literal().
heatshrink_decoder* heatshrink_decoder_alloc | ( | uint16_t | input_buffer_size, |
uint8_t | window_sz2, | ||
uint8_t | lookahead_sz2 | ||
) |
Definition at line 51 of file heatshrink_decoder.c.
References heatshrink_decoder_reset(), HEATSHRINK_MALLOC, HEATSHRINK_MAX_WINDOW_BITS, HEATSHRINK_MIN_LOOKAHEAD_BITS, HEATSHRINK_MIN_WINDOW_BITS, hsd, heatshrink_decoder::input_buffer_size, LOG, heatshrink_decoder::lookahead_sz2, NULL, and heatshrink_decoder::window_sz2.
Referenced by compress_and_expand_and_check(), data_with_simple_repetition_should_match_with_absurdly_tiny_buffers(), data_without_duplication_should_match_with_absurdly_tiny_buffers(), decode(), decoder_alloc_should_reject_excessively_small_window(), decoder_alloc_should_reject_zero_byte_input_buffer(), decoder_finish_should_note_when_done(), decoder_finish_should_reject_null_input(), decoder_poll_should_expand_short_literal(), decoder_poll_should_expand_short_literal_and_backref(), decoder_poll_should_expand_short_literal_and_backref_when_fed_input_byte_by_byte(), decoder_poll_should_expand_short_self_overlapping_backref(), decoder_poll_should_reject_null_output_buffer(), decoder_poll_should_reject_null_output_size_pointer(), decoder_poll_should_return_empty_if_empty(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_backref_expansion(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_literal_expansion(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), decoder_sink_should_reject_excessively_large_input(), decoder_sink_should_reject_null_count_pointer(), decoder_sink_should_reject_null_input_pointer(), decoder_sink_should_sink_data_when_preconditions_hold(), and espFsOpen().
HSD_finish_res heatshrink_decoder_finish | ( | heatshrink_decoder * | hsd | ) |
Definition at line 354 of file heatshrink_decoder.c.
References HSDR_FINISH_DONE, HSDR_FINISH_ERROR_NULL, HSDR_FINISH_MORE, HSDS_BACKREF_COUNT_LSB, HSDS_BACKREF_COUNT_MSB, HSDS_BACKREF_INDEX_LSB, HSDS_BACKREF_INDEX_MSB, HSDS_EMPTY, HSDS_YIELD_LITERAL, heatshrink_decoder::input_size, NULL, and heatshrink_decoder::state.
Referenced by compress_and_expand_and_check(), decode(), decoder_finish_should_note_when_done(), decoder_finish_should_reject_null_input(), decoder_poll_should_expand_short_literal_and_backref_when_fed_input_byte_by_byte(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), decoder_sink_read(), and espFsRead().
void heatshrink_decoder_free | ( | heatshrink_decoder * | hsd | ) |
Definition at line 74 of file heatshrink_decoder.c.
References HEATSHRINK_FREE, heatshrink_decoder::input_buffer_size, and heatshrink_decoder::window_sz2.
Referenced by compress_and_expand_and_check(), data_with_simple_repetition_should_match_with_absurdly_tiny_buffers(), data_without_duplication_should_match_with_absurdly_tiny_buffers(), decode(), decoder_finish_should_note_when_done(), decoder_finish_should_reject_null_input(), decoder_poll_should_expand_short_literal(), decoder_poll_should_expand_short_literal_and_backref(), decoder_poll_should_expand_short_literal_and_backref_when_fed_input_byte_by_byte(), decoder_poll_should_expand_short_self_overlapping_backref(), decoder_poll_should_reject_null_output_buffer(), decoder_poll_should_reject_null_output_size_pointer(), decoder_poll_should_return_empty_if_empty(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_backref_expansion(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_literal_expansion(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), decoder_sink_should_reject_excessively_large_input(), decoder_sink_should_reject_null_count_pointer(), decoder_sink_should_reject_null_input_pointer(), decoder_sink_should_sink_data_when_preconditions_hold(), and espFsClose().
HSD_poll_res heatshrink_decoder_poll | ( | heatshrink_decoder * | hsd, |
uint8_t * | out_buf, | ||
size_t | out_buf_size, | ||
size_t * | output_size | ||
) |
Definition at line 143 of file heatshrink_decoder.c.
References output_info::buf, output_info::buf_size, HSDR_POLL_EMPTY, HSDR_POLL_ERROR_NULL, HSDR_POLL_ERROR_UNKNOWN, HSDR_POLL_MORE, HSDS_BACKREF_COUNT_LSB, HSDS_BACKREF_COUNT_MSB, HSDS_BACKREF_INDEX_LSB, HSDS_BACKREF_INDEX_MSB, HSDS_CHECK_FOR_MORE_INPUT, HSDS_EMPTY, HSDS_INPUT_AVAILABLE, HSDS_YIELD_BACKREF, HSDS_YIELD_LITERAL, heatshrink_decoder::input_size, LOG, NULL, output_info::output_size, st_backref_count_lsb(), st_backref_count_msb(), st_backref_index_lsb(), st_backref_index_msb(), st_check_for_input(), st_input_available(), st_yield_backref(), st_yield_literal(), and heatshrink_decoder::state.
Referenced by compress_and_expand_and_check(), data_with_simple_repetition_should_match_with_absurdly_tiny_buffers(), data_without_duplication_should_match_with_absurdly_tiny_buffers(), decoder_finish_should_note_when_done(), decoder_poll_should_expand_short_literal(), decoder_poll_should_expand_short_literal_and_backref(), decoder_poll_should_expand_short_literal_and_backref_when_fed_input_byte_by_byte(), decoder_poll_should_expand_short_self_overlapping_backref(), decoder_poll_should_reject_null_hsd(), decoder_poll_should_reject_null_output_buffer(), decoder_poll_should_reject_null_output_size_pointer(), decoder_poll_should_return_empty_if_empty(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_backref_expansion(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_literal_expansion(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), decoder_sink_read(), and espFsRead().
void heatshrink_decoder_reset | ( | heatshrink_decoder * | hsd | ) |
Definition at line 82 of file heatshrink_decoder.c.
References heatshrink_decoder::bit_accumulator, heatshrink_decoder::bit_index, heatshrink_decoder::buffers, heatshrink_decoder::current_byte, heatshrink_decoder::head_index, HEATSHRINK_DECODER_INPUT_BUFFER_SIZE, HEATSHRINK_DECODER_WINDOW_BITS, HSDS_EMPTY, heatshrink_decoder::input_index, heatshrink_decoder::input_size, memset, heatshrink_decoder::output_count, heatshrink_decoder::output_index, and heatshrink_decoder::state.
Referenced by compress_and_expand_and_check(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), and heatshrink_decoder_alloc().
HSD_sink_res heatshrink_decoder_sink | ( | heatshrink_decoder * | hsd, |
uint8_t * | in_buf, | ||
size_t | size, | ||
size_t * | input_size | ||
) |
Definition at line 98 of file heatshrink_decoder.c.
References heatshrink_decoder::buffers, HEATSHRINK_DECODER_INPUT_BUFFER_SIZE, HSDR_SINK_ERROR_NULL, HSDR_SINK_FULL, HSDR_SINK_OK, HSDS_EMPTY, HSDS_INPUT_AVAILABLE, heatshrink_decoder::input_index, heatshrink_decoder::input_size, LOG, memcpy, NULL, and heatshrink_decoder::state.
Referenced by compress_and_expand_and_check(), data_with_simple_repetition_should_match_with_absurdly_tiny_buffers(), data_without_duplication_should_match_with_absurdly_tiny_buffers(), decoder_finish_should_note_when_done(), decoder_poll_should_expand_short_literal(), decoder_poll_should_expand_short_literal_and_backref(), decoder_poll_should_expand_short_literal_and_backref_when_fed_input_byte_by_byte(), decoder_poll_should_expand_short_self_overlapping_backref(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_backref_expansion(), decoder_poll_should_suspend_if_out_of_space_in_output_buffer_during_literal_expansion(), decoder_should_not_get_stuck_with_finish_yielding_MORE_but_0_bytes_output_from_poll(), decoder_sink_read(), decoder_sink_should_reject_excessively_large_input(), decoder_sink_should_reject_null_count_pointer(), decoder_sink_should_reject_null_hsd_pointer(), decoder_sink_should_reject_null_input_pointer(), decoder_sink_should_sink_data_when_preconditions_hold(), and espFsRead().
|
static |
Definition at line 380 of file heatshrink_decoder.c.
References output_info::buf, isprint, LOG, and output_info::output_size.
Referenced by st_yield_backref(), and st_yield_literal().
|
static |
Definition at line 263 of file heatshrink_decoder.c.
References BACKREF_COUNT_BITS, get_bits(), HSDS_BACKREF_COUNT_LSB, HSDS_YIELD_BACKREF, LOG, NO_BITS, and heatshrink_decoder::output_count.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 253 of file heatshrink_decoder.c.
References ASSERT, BACKREF_COUNT_BITS, get_bits(), HSDS_BACKREF_COUNT_LSB, HSDS_BACKREF_COUNT_MSB, LOG, NO_BITS, and heatshrink_decoder::output_count.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 241 of file heatshrink_decoder.c.
References BACKREF_COUNT_BITS, BACKREF_INDEX_BITS, get_bits(), HSDS_BACKREF_COUNT_LSB, HSDS_BACKREF_COUNT_MSB, HSDS_BACKREF_INDEX_LSB, LOG, NO_BITS, heatshrink_decoder::output_count, and heatshrink_decoder::output_index.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 231 of file heatshrink_decoder.c.
References ASSERT, BACKREF_INDEX_BITS, get_bits(), HSDS_BACKREF_INDEX_LSB, HSDS_BACKREF_INDEX_MSB, LOG, NO_BITS, and heatshrink_decoder::output_index.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 299 of file heatshrink_decoder.c.
References HSDS_EMPTY, HSDS_INPUT_AVAILABLE, and heatshrink_decoder::input_size.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 199 of file heatshrink_decoder.c.
References get_bits(), HEATSHRINK_DECODER_WINDOW_BITS, HSDS_BACKREF_INDEX_LSB, HSDS_BACKREF_INDEX_MSB, HSDS_YIELD_LITERAL, and heatshrink_decoder::output_index.
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 273 of file heatshrink_decoder.c.
References ASSERT, BACKREF_COUNT_BITS, output_info::buf_size, heatshrink_decoder::buffers, heatshrink_decoder::head_index, HEATSHRINK_DECODER_INPUT_BUFFER_SIZE, HEATSHRINK_DECODER_WINDOW_BITS, HSDS_CHECK_FOR_MORE_INPUT, HSDS_YIELD_BACKREF, LOG, heatshrink_decoder::output_count, heatshrink_decoder::output_index, output_info::output_size, and push_byte().
Referenced by heatshrink_decoder_poll().
|
static |
Definition at line 211 of file heatshrink_decoder.c.
References output_info::buf_size, heatshrink_decoder::buffers, get_bits(), heatshrink_decoder::head_index, HEATSHRINK_DECODER_INPUT_BUFFER_SIZE, HEATSHRINK_DECODER_WINDOW_BITS, HSDS_CHECK_FOR_MORE_INPUT, HSDS_YIELD_LITERAL, isprint, LOG, NO_BITS, output_info::output_size, and push_byte().
Referenced by heatshrink_decoder_poll().