Added ByteStream class and its documentation and tests