Skip to content

Conversation

@poluninatm
Copy link
Owner

No description provided.

Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оставил комментарии по коду

self.left = left
self.right = right

if type(self.left) is HaffNode:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для проверки соответствия типов рекомендуется использовать встроенную функцию:
if isinstance(self.left, HaffNode):

return (arch, code_dict)


def dehaffman(string, code_dict):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Даже декодирование. Класс!

return dearch


check_string = 'Проверка алгоритма Хаффмана'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отличная реализация алгоритма.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants