Обновить sk1/compressor.c

This commit is contained in:
Yevhen Kozirovskyi 2025-01-19 17:21:02 +00:00
parent 32a48a7f2a
commit 10cc53b3bb

View File

@ -217,7 +217,7 @@ int compressFile(const char* input_file_name, const char* output_file_name) {
byte <<= (8 - bitCount); byte <<= (8 - bitCount);
fwrite(&byte, sizeof(unsigned char), 1, outputFile); fwrite(&byte, sizeof(unsigned char), 1, outputFile);
} }
freeHuffmanTree(root);
fclose(inputFile); fclose(inputFile);
fclose(outputFile); fclose(outputFile);
return 0; return 0;
@ -270,7 +270,7 @@ int decompressFile(const char* input_file_name, const char* output_file_name) {
} }
} }
} }
freeHuffmanTree(root);
fclose(inputFile); fclose(inputFile);
fclose(outputFile); fclose(outputFile);
return 0; return 0;