Low level library for working with streams