From 26cf9707137971dee988c69d0b5cd09a3f8f8673 Mon Sep 17 00:00:00 2001 From: Damian Yerrick Date: Tue, 16 Jul 2019 17:04:23 -0400 Subject: [PATCH] don't need logo-compress.c anymore --- BootROMs/logo-compress.c | 62 ---------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 BootROMs/logo-compress.c diff --git a/BootROMs/logo-compress.c b/BootROMs/logo-compress.c deleted file mode 100644 index 2274eb28..00000000 --- a/BootROMs/logo-compress.c +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#include -#ifdef _WIN32 -#include -#include -#endif - -void pair(size_t count, uint8_t byte) -{ - static size_t unique_count = 0; - static uint8_t unique_data[15]; - if (count == 1) { - unique_data[unique_count++] = byte; - assert(unique_count <= 15); - } - else { - assert(count <= 15); - uint8_t control = (count << 4) | unique_count; - putchar(control); - - for (size_t i = 0; i < unique_count; i++) { - putchar(unique_data[i]); - } - - if (count != 0) { - putchar(byte); - } - else { - assert(control == 0); - } - - unique_count = 0; - } -} - -int main(int argc, char *argv[]) -{ - size_t count = 1; - uint8_t byte = getchar(); - int new; - size_t position = 0; - -#ifdef _WIN32 - _setmode(0,_O_BINARY); - _setmode(1,_O_BINARY); -#endif - - while ((new = getchar()) != EOF) { - if (byte == new) { - count++; - } - else { - pair(count, byte); - byte = new; - count = 1; - } - } - - pair(count, byte); - pair(0, 0); -}