Add byte stream object

Code taken from babcode