Tweak byte stream read

Let me know what you think, @tyoshino.