 headerBuffer = new Buffer(256)
 chunkedBuffer = null
 
-# readWholeFile = (path, size, callback) ->
-#   text = null
-#   fd = fs.openSync(path, "r")
-#   try
-#     bytesRead = fs.readSync(fd, headerBuffer, 0, Math.min(size, 256))
-#
-#     if !isBinaryFile(headerBuffer, bytesRead)
-#       remainingBytes = size - bytesRead;
-#       if remainingBytes > 0
-#         textBuffer = new Buffer(size)
-#         bytesRead = fs.readSync(fd, textBuffer, 0, size);
-#         text = textBuffer.toString("utf8", 0, bytesRead)
-#       else
-#         text = headerBuffer.toString("utf8", 0, bytesRead);
-#
-#     if text?
-#       callback(text.split('\n'), 1)
-#
-#   finally
-#     fs.closeSync(fd)
-
 readFile = (path, callback) ->
   chunkSize = readFile.CHUNK_SIZE
   line = 1

    bytesRead = fs.readSync(fd, chunkedBuffer, 0, chunkSize, 0)

    while bytesRead
      # Scarier looking. Uses least new objects
      index = lastIndexOf(chunkedBuffer, bytesRead, 10)
      if index < 0
        # no newlines here, the whole thing is a remainder

        newRemainder = chunkedBuffer.toString("utf8", index+1, bytesRead)
        str = chunkedBuffer.toString("utf8", 0, index)
        lines = str.split('\n')

      if not lines? or lines.length == 0
        remainder = concat(remainder, newRemainder)
