Compare by content shows false positives with ascii files
Moderators: Hacker, petermad, Stefan2, white
Compare by content shows false positives with ascii files
I have two files, called inner and outer (inside hxxp://ksp.sk/~mmx/pack.zip). When I compare them by content in text mode, there's a lot of differences (hxxp://people.ksp.sk/~mmx/differences.jpg), while those lines appear to be the same. In binary mode the only difference is on lines 160 and 161 (diff inner outer --binary confirms this).
I'm using Total Commander 8.01 x64 on Windows 7 SP1.
EDIT: Replace hxxp in URLs with the real thing (apparently I'm not allowed to post links to external sites).
I'm using Total Commander 8.01 x64 on Windows 7 SP1.
EDIT: Replace hxxp in URLs with the real thing (apparently I'm not allowed to post links to external sites).
I can confirm this. WinMerge shows only one difference with the files you provided. It seems that TC has a line length limit of some kind because the horizontal scrollbars show a weird behaviour when you pull them to the right.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The compare tool has a line length limit in text mode - 4kByte. If the line is longer, it will not be compared. This was necessary because lines are compared "on the fly" while drawn to the screen.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
OR - and that should be much more correct decision - Ghisler should to think about an introducing in TС - third party lib(or standalone exe) for comparing files - which will not have such stupid limitations. Because right now we should always to have on HDD/SSD at least one specialized comparing tool - exactly for such files. But obviously that such approach is not good and non suitable for everyday work.
Come on - we live at 21th centuries - but we are creating a limitations for files comparison...
Come on - we live at 21th centuries - but we are creating a limitations for files comparison...
#146217 personal license
You're too late with that suggestion:AntonDudarenko wrote:OR - and that should be much more correct decision - Ghisler should to think about an introducing in TС - third party lib(or standalone exe) for comparing files - which will not have such stupid limitations.
MfG DalaiTC help file, section 4.b) wrote:Comparetool= Set external compare tool for "Compare by contents", e.g. WinMerge
Last edited by Dalai on 2013-05-30, 09:10 UTC, edited 1 time in total.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
this is not a good suggestion - coz as I said - to have special tool for comparing - is a nice but not a perfect idea. IF inside the TC it was decided by author to implement the file comparison mechanism - then it should be enhanced and improved the same way as is done for the TC now.
As an example of the field for fixing we have now current limitation on 4k of text length - which is a very annoying "feature" which should be removed/fixed ASAP.
And IF author do not have enough time for improving this subtool - when definitely - he should to think about an introducing on a permanent basis at installation setup file along with TC's mains files and some 3tdparty comparison tool - which will be much more mature and useful.
As an example of the field for fixing we have now current limitation on 4k of text length - which is a very annoying "feature" which should be removed/fixed ASAP.
And IF author do not have enough time for improving this subtool - when definitely - he should to think about an introducing on a permanent basis at installation setup file along with TC's mains files and some 3tdparty comparison tool - which will be much more mature and useful.
#146217 personal license
It will be simpler (and will consume less RAM) to write the comparison results to a temporary file on the HDD.This was simplification. Strings are of course compared in RAM, and then the results are drawn. But longer lines cause longer comparison time, so there is a longer time between drawing consecutive lines on the screen.
We are not so S.M.A.R.T. as we imagine...
HDD is very slow when compared to RAM. Lack of RAM is not a problem - operating system moves some data from RAM to swap file in case of excessive RAM usage. So you don't have to worry about RAM usage and about writing data to HDD - operating system does this for you.siealex wrote: ... write the comparison results to a temporary file on the HDD.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC makes the comparison within a line only when it is displayed. This is much faster than during the initial comparison, because only a few lines (as many as fit on the screen) have to be compared, not the entire file.
The initial comparison of two files just looks for the line breaks, and then calculates a checksum (hash value) for each line. Then in a second step, only these hash values are compared to find identical lines.
The initial comparison of two files just looks for the line breaks, and then calculates a checksum (hash value) for each line. Then in a second step, only these hash values are compared to find identical lines.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com