Decode Tar archives with malformed UTF-8 data in headers (#19)
Decode Tar archives with malformed UTF-8 data in headers (#19)

* Decode Tar archives with malformed UTF-8 data in headers

Some Tar archives suck and leave malformed data in their headers, such as
the [Arch Linux bootstrap
image](http://mirror.rackspace.com/archlinux/iso/2022.02.01/archlinux-bootstrap-2022.02.01-x86_64.tar.gz).

To make these decodable via tar, we need to not throw when handling these
entries

* Only decode the value if necessary

If we know that we're going to discard the key, we can safely ignore
decoding the value altogether

* Still check that keys are valid

Reject tar files with malformed keys.

Co-authored-by: Simon Binder <6e153e0b007d41886131fe1b3c497d3f384be07d@simonbinder.eu>
simolus3/tar,simolus3/tar