© Sridhar Anandakrishnan 2018
Sridhar AnandakrishnanPropeller Programminghttps://doi.org/10.1007/978-1-4842-3354-2_10

10. Decompression in PASM

Sridhar Anandakrishnan1 
(1)
Department of Geosciences, University Park, Pennsylvania, USA
 

In this chapter we will write a PASM decompressor. We will go in the opposite direction from the compression code (flowchart in Figure 10-1): converting the packBuf array to the sampsBuf array (using the comprCodeBuf array to help in the reconstruction). In Figure 10-2, we have a great picture demonstrating that what goes up must come down... and that work can be fun!

10.1 Getting the Sign Right

Remember, packBuf contains sample 0 (the low 3 bytes) and differences between the j-th and j-1 sample. The length of the difference ...

Get Propeller Programming: Using Assembler, Spin, and C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.