PrestoSoft Blog :: Home

Wednesday, February 16, 2011

ExamDiff Pro 5.5: Determine Text/Binary By Name Filter

ExamDiff Pro has a powerful algorithm to determine whether files are text or binary, but it's not perfect: sometimes binary files are treated as text and vice versa. The next version of ExamDiff Pro will introduce a new feature to fine-tune the detection of text and binary files.

As an example, suppose that I'm comparing a set of PDF files without using a PDF-to-Text plug-in. PDF is a binary format, but occasionally the composition of a PDF file can fool ExamDiff Pro into thinking that it's a text file. This results in gibberish that's not particularly useful to me:


I could use the Files | Toggle Text/Binary Comparison command, but this is only a short-term solution, because I'd have to use it every time this problem occurs. Or I could go to View | Options | Compare | Advanced and select the option to treat all files as binary, but this is also a poor solution, because I'd have to remove this option whenever I compare text files.

The next version of ExamDiff Pro will introduce a better option: the Always treat these files as text and Always treat these files as binary pair of options under View | Options | Compare | Advanced. These options accept any set of name filter patterns, and will treat files matching these patterns accordingly. In my example, I can simply enter ".pdf" (no quotes) into the Always treat these files as binary box, and all PDF files will automatically be treated as binary files:


If I now re-compare, the PDF files are correctly treated as binary:


This has several advantages: in addition to making text/binary determination more accurate, it also speeds the process up, because matching a file to one of these patterns is much faster for ExamDiff Pro than determining whether it is a text or binary file based on its contents.

One final note: Because binary comparison is the more specialized application, the Always treat these files as binary takes precedence over the Always treat these files as text option: If a file matches both patterns, it will be treated as binary, and a file treated as text is compared to a file treated as binary, they will both be treated as binary.

Labels: ,

0 Comments:

Post a Comment

<< Home