I've tried to do investigate this more, but unfortunately I don't know enough about this part of the code base to be sure, sorry!

I does *seem* very plausible to me, given how the `getBytes()` function looks: https://github.com/mozilla/pdf.js/blob/master/src/core/stream.js#L131. Note how `this.bufferLength` is used to set the end point when returning a