Skip to content

Comments

Implement Huffman coding#5

Open
maxicot wants to merge 4 commits intomasterfrom
huffman
Open

Implement Huffman coding#5
maxicot wants to merge 4 commits intomasterfrom
huffman

Conversation

@maxicot
Copy link
Owner

@maxicot maxicot commented Nov 15, 2025

  • Implement Huffman's coding
  • Implement support for files
  • Document and test the code

@maxicot maxicot requested a review from KubEF November 15, 2025 20:58
Comment on lines +114 to +115
if padding == 8:
padding = 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Можно просто взять % 8

return (bytify(aligned), table, padding)


def decode_bytes(encoded: str, table: dict[str, str], padding: int) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Внутренние методы принято помечать _function

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.

2 participants