Of course.

For example you could read both files in thier entirety or one line at a time and compare some or all,

What is it you are looking to do?