Обновить sk1/compressor.c
This commit is contained in:
		
							parent
							
								
									3e2e5bf4ea
								
							
						
					
					
						commit
						1a4906801b
					
				| @ -97,7 +97,7 @@ void free_huffman_tree(Node* root) { | ||||
| } | ||||
| 
 | ||||
| // Функция сжатия данных с использованием алгоритма Хаффмана
 | ||||
| int compress_2(const char* input_file, const char* output_file) { | ||||
| int compress_1(const char* input_file, const char* output_file) { | ||||
|     FILE* input = fopen(input_file, "rb"); | ||||
|     FILE* output = fopen(output_file, "wb"); | ||||
|     if (!input || !output) return -1; | ||||
| @ -168,7 +168,7 @@ int compress_2(const char* input_file, const char* output_file) { | ||||
| } | ||||
| 
 | ||||
| // Функция декомпрессии данных с использованием алгоритма Хаффмана
 | ||||
| int decompress_2(const char* input_file, const char* output_file) { | ||||
| int decompress_1(const char* input_file, const char* output_file) { | ||||
|     FILE* input = fopen(input_file, "rb"); | ||||
|     FILE* output = fopen(output_file, "wb"); | ||||
|     if (!input || !output) return -1; | ||||
| @ -207,7 +207,7 @@ int decompress_2(const char* input_file, const char* output_file) { | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| int compress_1(const char *input_file, const char *output_file) { | ||||
| int compress_2(const char *input_file, const char *output_file) { | ||||
|     FILE *source = fopen(input_file, "rb"); | ||||
|     if (source == NULL) { | ||||
|         return -1; | ||||
| @ -293,7 +293,7 @@ int compress_1(const char *input_file, const char *output_file) { | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| int decompress_1(const char *input_file, const char *output_file) { | ||||
| int decompress_2(const char *input_file, const char *output_file) { | ||||
|     FILE *source = fopen(input_file, "rb"); | ||||
|     if (source == NULL) { | ||||
|         return -1; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user