Recently I’ve been implementing different compression algorithms in Rust for educational purposes.

While making an archiving program with file index I ran into a problem: writing file offsets after seek() sometimes writes random rubbish.

I didn’t post the issue on GitHub ‘cause it seems to be tricky to write a minimalistic example for the bug reproduction (also not sure if this is a bug at all).

If anyone runs into a similar issue—for me try_clone() and only then seek()/write() probably fixes the issue.