Thanks paul_nicholls,

Your code was a great help, just had to load the stream data into a pointer and it all seems to work great