Skip to main content
. 2024 Apr 5;26(4):316. doi: 10.3390/e26040316
Algorithm 6. Pseudocode for the decompressor part of the proposed near-lossless compression.
Inputs: vecSeed, vecUnary
Output: x // reconstructed hyperspectral data
Initialization: index  the index value obtained by interpreting the next unary code in vecUnary
For all index Do
        m the number bits to be read from vecSeed based on index value (Table 4).
        order  get the next m bits from vecSeed.
        seed get the seed value given the index (Table A1).
        cosθ given the index value (that corresponds to sinθ value), retrieve the cosine value from the lookup table.
        sinθindex/102
        Mseed/(1+sinθ)
        scosθ×M
        xs×s
End Do