Detect compression from filename in writetable