@AlexTP:
If I remember correctly (and what seem logical) is that you probably can't use absolute positions (you can use seek instead). Is there anything inside your savetostream that perhaps makes use of using the position inside the stream ?
That is the only thing i can think of atm. I would have to verify/check for possible other causes because it should work the same as using a normal (file)stream.