Like you mentioned I'm not sure buffer length is actually the length of the stream. Could you dig a bit more to verify it is?