Detecting if a File is Compressed using Machine Learning? Let's say that I want a 'general' way using some machine learning model to     classify if a file is possibly compressed or not.
I don't need a 100% success rate.
How would you approach this?
I thought it might be nice to get some features like:


*

*File name extension 

*file header bytes

*file entropy


And send that to an ANN or SVM model - is that a good approach?
 A: Looking at extensions is cheating so I won't go into that. 
The point of compression is to increase the information density in the resulting data. Random data has the highest information density (see e.g. wikipedia). Without going into details, this implies for binary compressed files that, ideally, the probability of the next bit to be 1 given the seen compressed data should be close to 50%.
Hence, if data is properly compressed, its bit representation should not contain residual patterns. You can test for randomness of the bit representation using standard statistics. Fancy machine learning is probably not necessary, though it may be interesting to see if you can identify which algorithm (if any) was used to compress a given file.
A: Very often, the first bytes of the data file for a header, which helps the decoder, even when the extension is absent. In addition to extensions or file information metrics, you can use them as signatures, supervised using File signature tables, or learnt. As coders have different options that compress more or less, this signature may help.
