Support of pseudo-streaming

Necessary functions for pseudo-streaming.