This commit is contained in:
Volodymyr Baliasnikov 2026-11-10 19:49:07 +01:00
parent e42bb36f12
commit 3382dbecc6

View File

@ -116,7 +116,7 @@ class HuffmanTree:
# Достаем из словаря код для этой буквы и добавляем в список # Достаем из словаря код для этой буквы и добавляем в список
code = self._codes_map[char] code = self._codes_map[char]
result.append(code) result.append(code)
return "".join(result) # "" означают пробел между кусками типо (0, 11, 01) return "".join(result) # "" означают пробел между кусками типо (0, 11, 01)
def decode(self, bits): def decode(self, bits):
if not self.root or not bits: if not self.root or not bits: