summaryrefslogtreecommitdiff
path: root/supervisor/shared/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'supervisor/shared/translate.c')
-rw-r--r--supervisor/shared/translate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c
index 1fa361c15..aa5e4517c 100644
--- a/supervisor/shared/translate.c
+++ b/supervisor/shared/translate.c
@@ -34,6 +34,14 @@
#include "genhdr/compression.generated.h"
#endif
+#include "supervisor/serial.h"
+
+void serial_write_compressed(const compressed_string_t* compressed) {
+ char decompressed[compressed->length];
+ decompress(compressed, decompressed);
+ serial_write(decompressed);
+}
+
char* decompress(const compressed_string_t* compressed, char* decompressed) {
uint8_t this_byte = 0;
uint8_t this_bit = 7;