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.