Reimplementing the haar wavelet persistence mechanism with standard library streams.