barebones IStream generic functions