functions for reading and writing streaming archives
