Skip to content

Suspected improper padding bit logic #148

@trjr

Description

@trjr

Line 346 of encoder.py intends to extend the data stream buffer with padding bits if it does not meet a codeword boundary.

However, if length % 8 is 0, meaning that the length does indeed fall on the codeword boundary, then this implementation adds 8 padding bits, and it should not do so.

You can see the difference in final forms of the encoding of the string known via segno: segno.make("known", version=1, error='L', mode='byte', mask=0, boost_error=False) vs. the equivalent results from and . All three of these will be decoded to the same word, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions