<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=File_comparison</id>
	<title>File comparison - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=File_comparison"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=File_comparison&amp;action=history"/>
	<updated>2026-10-26T13:35:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=File_comparison&amp;diff=2477180&amp;oldid=prev</id>
		<title>imported&gt;PrimeBOT: Task 24: elink template removal following a TFD</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=File_comparison&amp;diff=2477180&amp;oldid=prev"/>
		<updated>2024-10-19T04:57:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki143/index.php?title=User:PrimeBOT/24&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:PrimeBOT/24 (page does not exist)&quot;&gt;Task 24&lt;/a&gt;: elink template removal following &lt;a href=&quot;https://en.wikipedia.org/wiki/Templates_for_discussion/Log/2024_September_20&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Templates for discussion/Log/2024 September 20&quot;&gt;a TFD&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{About|data object, text, and file comparisons in computing||Comparison (disambiguation){{!}}Comparison}}&lt;br /&gt;
[[File:Kompare.png|thumb|The [[KDE]] [[diff]] tool &amp;#039;&amp;#039;[[Kompare]]&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Editing documents, program code, or any data always risks introducing errors. Displaying the differences between two or more sets of data, &amp;#039;&amp;#039;&amp;#039;file comparison&amp;#039;&amp;#039;&amp;#039; tools can make computing simpler, and more efficient by focusing on new data and ignoring what did not change. Generically known as a &amp;#039;&amp;#039;&amp;#039;diff&amp;#039;&amp;#039;&amp;#039;&amp;lt;ref&amp;gt;[http://catb.org/jargon/html/D/diff.html &amp;quot;diff&amp;quot;, The Jargon File]&amp;lt;/ref&amp;gt; after the [[Unix]] [[diff utility|&amp;lt;code&amp;gt;diff&amp;lt;/code&amp;gt; utility]], there are a range of ways to compare data sources and display the results.&lt;br /&gt;
&lt;br /&gt;
Some widely used file comparison programs are [[diff]], [[cmp (Unix)|cmp]], [[Apple Developer Tools#FileMerge|FileMerge]], [[WinMerge]], [[Beyond Compare]], and [[File Compare]].&lt;br /&gt;
&lt;br /&gt;
Because understanding changes is important to writers of code or documents, many [[text editor]]s and [[word processor]]s include the functionality necessary to see the changes between different versions of a file or document.&lt;br /&gt;
&lt;br /&gt;
== Method types ==&lt;br /&gt;
&lt;br /&gt;
The most efficient method of finding differences depends on the source data, and the nature of the changes. One approach is to find the [[longest common subsequence problem|longest common subsequence]] between two files, then regard the non-common data as an insertion, or a deletion.&lt;br /&gt;
&lt;br /&gt;
In 1978, Paul Heckel published an algorithm that identifies most moved blocks of text.&amp;lt;ref&amp;gt;{{Citation|first1=Paul|last1=Heckel|year=1978|title=A Technique for Isolating Differences Between Files|journal=Communications of the ACM|volume=21|issue=4|pages=264–268|url=http://documents.scribd.com/docs/10ro9oowpo1h81pgh1as.pdf|access-date=2011-12-04|doi=10.1145/359460.359467|s2cid=207683976}}&amp;lt;/ref&amp;gt; This is used in the [[IBM History Flow tool]].&amp;lt;ref&amp;gt;{{Citation|last1=Viégas|first1=Fernanda B.|last2=Wattenberg|first2=Martin|last3=Kushal|first3=Kushal Dave|year=2004|title=Studying Cooperation and Conflict between Authors with history flow Visualizations|publisher=CHI|volume=6|pages=575–582|publication-place=Vienna|url=http://domino.watson.ibm.com/cambridge/research.nsf/58bac2a2a6b05a1285256b30005b3953/53240210b04ea0eb85256f7300567f7e/$FILE/TR2004-19.pdf|access-date=2011-12-01}}&amp;lt;/ref&amp;gt; Other file comparison programs find block moves.{{Clarify|date=January 2012}}&lt;br /&gt;
&lt;br /&gt;
Some specialized file comparison tools find the [[longest increasing subsequence]] between two files.&amp;lt;ref name=&amp;quot;PatentUS7031972B2&amp;quot;&amp;gt;{{cite web |author1=Liwei Ren |author2=Jinsheng Gu |author3=Luosheng Peng |title=Algorithms for block-level code alignment of software binary files |url=https://patents.google.com/patent/US7031972 |website=Google Patents |publisher=USPTO |access-date=10 May 2019 |date=18 April 2006}}&amp;lt;/ref&amp;gt; The [[rsync]] protocol uses a [[rolling hash]] function to compare two files on two distant computers with low communication overhead.&lt;br /&gt;
&lt;br /&gt;
File comparison in word processors is typically at the word level, while comparison in most programming tools is at the line level. Byte or character-level comparison is useful in some specialized applications.&lt;br /&gt;
&lt;br /&gt;
== Display ==&lt;br /&gt;
&lt;br /&gt;
The optimal way to display the results of a file comparison depends on many factors, including the type of source data. The fixed lines of programming code provide a clear unit of comparison. This does not work with documents, where adding a single word may cause the following lines to wrap differently, but still not change the content.&lt;br /&gt;
&lt;br /&gt;
The most popular ways to display changes are either side-by-side, or a consolidating view that highlights data inserts, and deletes. In either side-by-side viewing, [[code folding]] or [[folding editor|text folding]], for the sake of efficiency, the interface may hide portions of the file that did not change and show only the changes.{{Clarify|date=January 2012}}&lt;br /&gt;
&lt;br /&gt;
== Reasoning ==&lt;br /&gt;
&lt;br /&gt;
There are various reasons to use comparison tools, and tools themselves use different approaches. To compare binary files, a tool may use byte-level comparison. Comparing [[text file]]s or [[computer program]]s, many tools use a side-by-side visual comparison.&amp;lt;ref&amp;gt;{{Cite book |last1=MacKenzie |first1=David |url=https://books.google.com/books?id=oIINAAAACAAJ |title=Comparing and Merging Files with Gnu Diff and Patch |last2=Eggert |first2=Paul |last3=Stallman |first3=Richard |date=2003 |publisher=Network Theory |isbn=978-0-9541617-5-0 |language=en}}&amp;lt;/ref&amp;gt; This gives the user the chance to choose which changes to keep or reject before merging the files into a new version.&amp;lt;ref&amp;gt;{{Cite web |title=File comparison software: vc-dwim and vc-chlog |url=http://www.gnu.org/software/vc-dwim/vc-dwim.html |access-date=2023-04-16 |website=www.gnu.org}}&amp;lt;/ref&amp;gt; Or perhaps to keep them both as-is for later reference, through some form of &amp;quot;versioning&amp;quot; control.&lt;br /&gt;
&lt;br /&gt;
File comparison is an important, and integral process of [[file synchronization]] and [[backup]]. In backup methodologies, the issue of [[data corruption]] is important. Rarely is there a warning before corruption occurs, this can make recovery difficult or impossible. Often, the problem is only apparent the next time someone tries to open a file. In this circumstance, a comparison tool can help to isolate the introduction of the problem.&amp;lt;ref&amp;gt;{{Cite web |title=SystemRescue - System Rescue Homepage |url=https://www.system-rescue.org/ |access-date=2023-04-16 |website=www.system-rescue.org}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Historical uses ==&lt;br /&gt;
&lt;br /&gt;
Prior to file comparison, machines existed to compare magnetic tapes or punch cards.  The [[IBM 519|IBM 519 Card Reproducer]] could determine whether a deck of [[punched card]]s were equivalent.  In 1957, [[John Van Gardner]] developed a system to compare the [[check sum]]s of loaded sections of [[Fortran]] programs to [[debugging|debug]] compilation problems on the [[IBM 704]].&amp;lt;ref&amp;gt;{{cite web |url=http://www.softwarepreservation.org/projects/FORTRAN/paper/John%20Van%20Gardner%20-%20Fortran%20And%20The%20Genesis%20Of%20Project%20Intercept.pdf |title=Fortran And The Genesis Of Project Intercept |author=John Van Gardner |access-date=2011-12-06}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{Annotated link |Comparison of file comparison tools}}&lt;br /&gt;
* {{Annotated link |Computer-assisted reviewing}}&lt;br /&gt;
* {{Annotated link |Data differencing}}&lt;br /&gt;
* {{Annotated link |Delta encoding}}&lt;br /&gt;
* {{Annotated link |Document comparison}}&lt;br /&gt;
* {{Annotated link |Edit distance}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
{{commons category|File comparison}}&lt;br /&gt;
&lt;br /&gt;
{{Computer files}}&lt;br /&gt;
{{Version control software}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File comparison tools| ]]&lt;br /&gt;
[[Category:Data differencing]]&lt;br /&gt;
[[Category:Utility software types]]&lt;/div&gt;</summary>
		<author><name>imported&gt;PrimeBOT</name></author>
	</entry>
</feed>