/ SHARP_BadApple / heatshrink_config.h
heatshrink_config.h
1 // SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams for Adafruit Industries 2 // 3 // SPDX-License-Identifier: MIT 4 5 #ifndef HEATSHRINK_CONFIG_H 6 #define HEATSHRINK_CONFIG_H 7 8 /* Should functionality assuming dynamic allocation be used? */ 9 #ifndef HEATSHRINK_DYNAMIC_ALLOC 10 #define HEATSHRINK_DYNAMIC_ALLOC 0 11 #endif 12 13 #if HEATSHRINK_DYNAMIC_ALLOC 14 /* Optional replacement of malloc/free */ 15 #define HEATSHRINK_MALLOC(SZ) malloc(SZ) 16 #define HEATSHRINK_FREE(P, SZ) free(P) 17 #else 18 /* Required parameters for static configuration */ 19 #define HEATSHRINK_STATIC_INPUT_BUFFER_SIZE 2048 20 #define HEATSHRINK_STATIC_WINDOW_BITS 11 21 #define HEATSHRINK_STATIC_LOOKAHEAD_BITS 4 22 #endif 23 24 /* Turn on logging for debugging. */ 25 #define HEATSHRINK_DEBUGGING_LOGS 0 26 27 /* Use indexing for faster compression. (This requires additional space.) */ 28 #define HEATSHRINK_USE_INDEX 1 29 30 #endif