We propose a new lossless and near-lossless compression algorithm for hyperspectral images based on context-based adaptive lossless image coding (CALIC). Specifically, we propose a novel multiband spectral predictor, along with optimized model parameters and optimization thresholds. The resulting algorithm is suitable for compression of data in band-interleaved-by-line format; its performance evaluation on Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) data shows that it outperforms 3-D-CALIC as well as other state-of-the-art compression algorithms.