Make a buffer from part of a file