Skip to content

flate: Data corruption when compressing with flate.BestCompression #1114

@Hakkin

Description

@Hakkin

See kopia/kopia#5049 for initial details.

Reproducer here: https://go.dev/play/p/bU_ax9x8Ct2
It seems to trigger when compressing over a certain amount of data, in this case, just 1MiB of 0x00 results in:
decompress: flate: corrupt input before offset 10
when attempted to decompress the just compressed data.

This seems to have been introduced in commit 6e2f5d5, released in v1.18.1, commits before that one produce the expected output.

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