File Comparator FYI

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
therube
Posts: 674
Joined: 14 Dec 2006, 06:22

File Comparator FYI

Post by therube »

File Comparator - FYI

Just to point out that the Autodetect Files Type may not be the optimal choice - depending upon circumstances.

Like if you were comparing MP3s.
An MP3 would be Autodetected as a binary file.

WMP has a habit of playing with MP3 tags.
So what you may have archived away could end up being different from the same file once it has been played in WMP.

If you were to use Comparator using its' defaults, with the MP3s detected as binary, most likely, in this situation, you would not be presented with particularly relevant results. (Most likely the files would appear to be substantially different.)

However, having some idea that the change may be tag related, manually selecting Text File Type in Comparator would very clearly point out that the change was in fact tag related, with the actual changes to the file in fact being very minor.
WinXP Pro SP3 or Win7 x86 | SS 2.54
Jan Patera
Plugin Developer
Plugin Developer
Posts: 707
Joined: 08 Dec 2005, 14:33
Location: Prague, Czech Republic
Contact:

Re: File Comparator FYI

Post by Jan Patera »

therube wrote:An MP3 would be Autodetected as a binary file.
That's of course correct.
User avatar
mdruiter
Posts: 262
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: File Comparator FYI

Post by mdruiter »

Maybe therube means that it would be great if the File Comparator would only consider the changed part(s) during its file type detection. But that's a Catch-22 situation. :mrgreen:
therube
Posts: 674
Joined: 14 Dec 2006, 06:22

Re: File Comparator FYI

Post by therube »

That's of course correct.
Correct.

it would be great if the File Comparator would only consider the changed part(s) during its file type detection
In a way, I guess you can say.

But that's my point. It cannot "know" the right method all the time. So, someone else may need to help it (File Comparator) out a bit ;-).

In my particular scenario, binary happens to be the correct choice based on file contents, but the comparison algorithm used for binary happens to be "incorrect" for the particular situation encountered. (The binary comparison algorithm is entirely correct, only when used here, it does not present pertinent data, thereby making it "incorrect", where a textual comparison will present data in a pertinent manner.)
WinXP Pro SP3 or Win7 x86 | SS 2.54
User avatar
mdruiter
Posts: 262
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: File Comparator FYI

Post by mdruiter »

The binary comparison algorithm is entirely correct
Yes.
But 'correct' is not a boolean. :-) The algorithm detecting file type is also 'correct'. But it's only making a guess. Probably according to a simple rule, such as "if it contains something weird, assume binary". My idea would be to improve this rule a bit, by considering Esc as "not so weird" (see http://forum.altap.cz/viewtopic.php?f=2&t=3945).
Of course no rule can ever be perfect. If it were, the choice between "automatic, text, binary" would not be necessary. So I guess we completely agree!
Post Reply