Store and restore stream