PSTACK: An Optimal Online Compression Algorithm for Hysteresis-Driven Data Streams | Synapse