I use GNU tar. It can auto detect compression type when compressing/decompressing files. But I need to decompress an archive from stdin and the compress type is unknown. I noticed that tar can give me correct suggesting like:
tar: Archive is compressed. Use -z option
But I want tar to use that compression option automatically without asking me to input that argument. How can I do that? Why not tar just decompress since it already knows the compression type?