Performance boost: Use /Length from stream dict to determine end of stream

Rather than using a regex to find the "endstream" token, just use /Length
from the stream's dict as the length of the stream.