From 530e660caeaab63c617f2771ff32bc70e434805c Mon Sep 17 00:00:00 2001 From: Yurii Chechur Date: Thu, 26 Dec 2024 15:59:35 +0000 Subject: [PATCH] Update sk1/compressor.h --- sk1/compressor.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sk1/compressor.h b/sk1/compressor.h index cf1958b..ca2fa61 100644 --- a/sk1/compressor.h +++ b/sk1/compressor.h @@ -1,10 +1,17 @@ #ifndef COMPRESSOR_H #define COMPRESSOR_H -// Функції компресії та декомпресії для двох алгоритмів -int compress_1(const char* input_file_name, const char* output_file_name); -int decompress_1(const char* input_file_name, const char* output_file_name); -int compress_2(const char* input_file_name, const char* output_file_name); -int decompress_2(const char* input_file_name, const char* output_file_name); +#include + +typedef struct { + unsigned char byte; + unsigned long freq; +} HuffmanSymbol; + +// Функції для стиснення та розпакування +int rle_compress(const char *input_filename, const char *output_filename); +int rle_decompress(const char *input_filename, const char *output_filename); +int lz77_compress(const char *input_filename, const char *output_filename); +int lz77_decompress(const char *input_filename, const char *output_filename); #endif