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
        M←seed/(1+sin⁡θ)
        s←cos⁡θ×M
        x←s×s
End Do