From fe19aee16d26d272c6488e2beebeb80d07fc22de Mon Sep 17 00:00:00 2001 From: Ashok Bakthavathsalam Date: Wed, 1 Jan 2020 23:26:13 +0530 Subject: [PATCH] EOF newline bug fixed The bug is documented here https://github.com/kgashok/huffman-coding/issues/1 --- huffman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huffman.py b/huffman.py index c513d6c..4a3247f 100644 --- a/huffman.py +++ b/huffman.py @@ -115,7 +115,7 @@ def compress(self): with open(self.path, 'r+') as file, open(output_path, 'wb') as output: text = file.read() - text = text.rstrip() + # text = text.rstrip() frequency = self.make_frequency_dict(text) self.make_heap(frequency)