A thin film magnetic field sensor with perpendicular axis sensitivity uses either a giant magnetoresistance material element or a spin tunnel junction element. A flash controller interface receives a command for purging the flash storage device and provides a purge command to flash controllers in the flash storage device. Following the predictive coding paradigm, local temporal and spatial dependencies between layers and frames are exploited for layer-wise compression.