How can one detect the type of compression used on the file? (assuming that .zip, .gz, .xz or any other extension is not specified).
Is this information stored somew
As an alternative to inspecting the file header by hand, you could use some utility like TrID. The link points to the cross-platform command line version; for Windows there's a GUI, too.