Robust compression and classification of hyperspectral images