Needs an additional test for files that fit within the buffer.