Ellen Jean Chapin
Ellen Jean Chapin

Reputation: 61

Decompressing tar.zst file-- why am I getting a premature end error?

I have been trying to download this dataset through my Mac terminal. I know it's huge! https://zenodo.org/record/3606810

I have the tar.zst file, and when I try to decompress (using zstd -d pol_0616-1119_labeled.tar.zst), it throws me this error:

1119_labeled.tar.zst : Read error (39) : premature end

I've looked like crazy for ways to troubleshoot. Is there something obvious I'm missing? Thanks in advance for any help.

Upvotes: 6

Views: 15755

Answers (1)

Jannis Froese
Jannis Froese

Reputation: 1407

The error might be a corrupted file, or a file that wasn't closed properly. Annoyingly in this case zstd gives you nothing. You can work around this by letting zstd output to stdout and redirecting that into a file

zstd -d pol_0616-1119_labeled.tar.zst --stdout > pol_0616-1119_labeled.tar

This trick gives you as much data as it can successfully decompress

Upvotes: 8

Related Questions