Skip to content

Edge case fail in all Huffman Encoding implementations. #659

Open
@Trashtalk217

Description

@Trashtalk217

Whenever any (or most) of the Huffman Encoding implementations receive a string with only one character multiple times (think 'aaaaaaaaaaaaa', or 'bbbb'). The functions fail and give either errors, or weird empty output. Here are some examples of Python, Java and Lua respectively. I assume this has to be fixed because it nowhere states in the chapter that it shouldn't work on one-character-strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Implementation EditThis provides an edit to an algorithm implementation. (Code and maybe md files are edited.)ProblemThis is a problem in the archive or an implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions