MeterLogger
|
Go to the source code of this file.
Data Structures | |
struct | hs_index |
struct | heatshrink_encoder |
Macros | |
#define | HEATSHRINK_ENCODER_WINDOW_BITS(HSE) ((HSE)->window_sz2) |
#define | HEATSHRINK_ENCODER_LOOKAHEAD_BITS(HSE) ((HSE)->lookahead_sz2) |
#define | HEATSHRINK_ENCODER_INDEX(HSE) ((HSE)->search_index) |
Enumerations | |
enum | HSE_sink_res { HSER_SINK_OK, HSER_SINK_ERROR_NULL =-1, HSER_SINK_ERROR_MISUSE =-2 } |
enum | HSE_poll_res { HSER_POLL_EMPTY, HSER_POLL_MORE, HSER_POLL_ERROR_NULL =-1, HSER_POLL_ERROR_MISUSE =-2 } |
enum | HSE_finish_res { HSER_FINISH_DONE, HSER_FINISH_MORE, HSER_FINISH_ERROR_NULL =-1 } |
Functions | |
heatshrink_encoder * | heatshrink_encoder_alloc (uint8_t window_sz2, uint8_t lookahead_sz2) |
void | heatshrink_encoder_free (heatshrink_encoder *hse) |
void | heatshrink_encoder_reset (heatshrink_encoder *hse) |
HSE_sink_res | heatshrink_encoder_sink (heatshrink_encoder *hse, uint8_t *in_buf, size_t size, size_t *input_size) |
HSE_poll_res | heatshrink_encoder_poll (heatshrink_encoder *hse, uint8_t *out_buf, size_t out_buf_size, size_t *output_size) |
HSE_finish_res | heatshrink_encoder_finish (heatshrink_encoder *hse) |
#define HEATSHRINK_ENCODER_INDEX | ( | HSE | ) | ((HSE)->search_index) |
Definition at line 32 of file heatshrink_encoder.h.
Referenced by do_indexing(), and find_longest_match().
#define HEATSHRINK_ENCODER_LOOKAHEAD_BITS | ( | HSE | ) | ((HSE)->lookahead_sz2) |
Definition at line 30 of file heatshrink_encoder.h.
Referenced by get_lookahead_size(), and st_yield_br_index().
#define HEATSHRINK_ENCODER_WINDOW_BITS | ( | HSE | ) | ((HSE)->window_sz2) |
Definition at line 28 of file heatshrink_encoder.h.
Referenced by get_input_buffer_size(), heatshrink_encoder_free(), heatshrink_encoder_reset(), and st_yield_tag_bit().
enum HSE_finish_res |
Enumerator | |
---|---|
HSER_FINISH_DONE | |
HSER_FINISH_MORE | |
HSER_FINISH_ERROR_NULL |
Definition at line 21 of file heatshrink_encoder.h.
enum HSE_poll_res |
Enumerator | |
---|---|
HSER_POLL_EMPTY | |
HSER_POLL_MORE | |
HSER_POLL_ERROR_NULL | |
HSER_POLL_ERROR_MISUSE |
Definition at line 14 of file heatshrink_encoder.h.
enum HSE_sink_res |
Enumerator | |
---|---|
HSER_SINK_OK | |
HSER_SINK_ERROR_NULL | |
HSER_SINK_ERROR_MISUSE |
Definition at line 8 of file heatshrink_encoder.h.
heatshrink_encoder* heatshrink_encoder_alloc | ( | uint8_t | window_sz2, |
uint8_t | lookahead_sz2 | ||
) |
Definition at line 78 of file heatshrink_encoder.c.
References get_input_buffer_size(), heatshrink_encoder_reset(), HEATSHRINK_FREE, HEATSHRINK_MALLOC, HEATSHRINK_MAX_WINDOW_BITS, HEATSHRINK_MIN_LOOKAHEAD_BITS, HEATSHRINK_MIN_WINDOW_BITS, hse, LOG, heatshrink_encoder::lookahead_sz2, NULL, heatshrink_encoder::search_index, hs_index::size, and heatshrink_encoder::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(), encode(), encoder_alloc_should_reject_invalid_arguments(), encoder_poll_should_detect_repeated_substring(), encoder_poll_should_detect_repeated_substring_and_preserve_trailing_literal(), encoder_poll_should_indicate_when_no_input_is_provided(), encoder_poll_should_reject_nulls(), encoder_should_emit_data_without_repetitions_as_literal_sequence(), encoder_should_emit_series_of_same_byte_as_literal_then_backref(), encoder_sink_should_accept_input_when_it_will_fit(), encoder_sink_should_accept_partial_input_when_some_will_fit(), encoder_sink_should_reject_nulls(), and gen().
HSE_finish_res heatshrink_encoder_finish | ( | heatshrink_encoder * | hse | ) |
Definition at line 260 of file heatshrink_encoder.c.
References FLAG_IS_FINISHING, heatshrink_encoder::flags, HSER_FINISH_DONE, HSER_FINISH_ERROR_NULL, HSER_FINISH_MORE, HSES_DONE, HSES_FILLED, HSES_NOT_FULL, LOG, NULL, and heatshrink_encoder::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(), encoder_finish_should_reject_nulls(), encoder_poll_should_detect_repeated_substring(), encoder_poll_should_detect_repeated_substring_and_preserve_trailing_literal(), encoder_should_emit_data_without_repetitions_as_literal_sequence(), encoder_should_emit_series_of_same_byte_as_literal_then_backref(), encoder_sink_read(), and gen().
void heatshrink_encoder_free | ( | heatshrink_encoder * | hse | ) |
Definition at line 114 of file heatshrink_encoder.c.
References HEATSHRINK_ENCODER_WINDOW_BITS, and HEATSHRINK_FREE.
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(), encode(), encoder_poll_should_detect_repeated_substring(), encoder_poll_should_detect_repeated_substring_and_preserve_trailing_literal(), encoder_poll_should_indicate_when_no_input_is_provided(), encoder_poll_should_reject_nulls(), encoder_should_emit_data_without_repetitions_as_literal_sequence(), encoder_should_emit_series_of_same_byte_as_literal_then_backref(), encoder_sink_should_accept_input_when_it_will_fit(), encoder_sink_should_accept_partial_input_when_some_will_fit(), encoder_sink_should_reject_nulls(), and gen().
HSE_poll_res heatshrink_encoder_poll | ( | heatshrink_encoder * | hse, |
uint8_t * | out_buf, | ||
size_t | out_buf_size, | ||
size_t * | output_size | ||
) |
Definition at line 198 of file heatshrink_encoder.c.
References output_info::buf, output_info::buf_size, do_indexing(), heatshrink_encoder::flags, HSER_POLL_EMPTY, HSER_POLL_ERROR_MISUSE, HSER_POLL_ERROR_NULL, HSER_POLL_MORE, HSES_DONE, HSES_FILLED, HSES_FLUSH_BITS, HSES_NOT_FULL, HSES_SAVE_BACKLOG, HSES_SEARCH, HSES_YIELD_BR_INDEX, HSES_YIELD_BR_LENGTH, HSES_YIELD_LITERAL, HSES_YIELD_TAG_BIT, LOG, NULL, output_info::output_size, st_flush_bit_buffer(), st_save_backlog(), st_step_search(), st_yield_br_index(), st_yield_br_length(), st_yield_literal(), st_yield_tag_bit(), and heatshrink_encoder::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(), encoder_poll_should_detect_repeated_substring(), encoder_poll_should_detect_repeated_substring_and_preserve_trailing_literal(), encoder_poll_should_indicate_when_no_input_is_provided(), encoder_poll_should_reject_nulls(), encoder_should_emit_data_without_repetitions_as_literal_sequence(), encoder_should_emit_series_of_same_byte_as_literal_then_backref(), encoder_sink_read(), and gen().
void heatshrink_encoder_reset | ( | heatshrink_encoder * | hse | ) |
Definition at line 126 of file heatshrink_encoder.c.
References heatshrink_encoder::bit_index, heatshrink_encoder::buffer, heatshrink_encoder::current_byte, heatshrink_encoder::flags, HEATSHRINK_ENCODER_WINDOW_BITS, HSES_NOT_FULL, heatshrink_encoder::input_size, heatshrink_encoder::match_length, heatshrink_encoder::match_scan_index, memset, heatshrink_encoder::outgoing_bits, heatshrink_encoder::outgoing_bits_count, and heatshrink_encoder::state.
Referenced by compress_and_expand_and_check(), and heatshrink_encoder_alloc().
HSE_sink_res heatshrink_encoder_sink | ( | heatshrink_encoder * | hse, |
uint8_t * | in_buf, | ||
size_t | size, | ||
size_t * | input_size | ||
) |
Definition at line 145 of file heatshrink_encoder.c.
References heatshrink_encoder::buffer, do_indexing(), find_longest_match(), get_input_buffer_size(), get_input_offset(), hse, HSER_SINK_ERROR_MISUSE, HSER_SINK_ERROR_NULL, HSER_SINK_OK, HSES_FILLED, HSES_NOT_FULL, heatshrink_encoder::input_size, is_finishing(), LOG, memcpy, NULL, hs_index::size, st_flush_bit_buffer(), st_save_backlog(), st_step_search(), st_yield_br_index(), st_yield_br_length(), st_yield_literal(), st_yield_tag_bit(), and heatshrink_encoder::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(), encoder_poll_should_detect_repeated_substring(), encoder_poll_should_detect_repeated_substring_and_preserve_trailing_literal(), encoder_should_emit_data_without_repetitions_as_literal_sequence(), encoder_should_emit_series_of_same_byte_as_literal_then_backref(), encoder_sink_read(), encoder_sink_should_accept_input_when_it_will_fit(), encoder_sink_should_accept_partial_input_when_some_will_fit(), encoder_sink_should_reject_nulls(), and gen().