Work in progress, getting code out of stackoverflow to work on byte streams