Kompare

Last updated
Kompare
Kompare icon.svg
Kompare.png
A screenshot of Kompare
Developer(s) KDE
Stable release 21.04.3 (8 July 2021;36 days ago (2021-07-08) [1] ) [±]
Repository OOjs UI icon edit-ltr-progressive.svg
Written in C++
Operating system Cross-Platform
Type Diff and Merge Tool
License GPL
Website apps.kde.org/en/kompare   OOjs UI icon edit-ltr-progressive.svg

Kompare (formerly "Kdiff") is a graphical diff and merge tool targeting developers. It allows users to compare two different text files or two directories. It is part of KDE Applications (and formerly part of KDE Software Compilation) and therefore primarily used on Linux and other Unix-like operating systems, as well as Windows. Kompare does not actually compute the differences between the compared files itself, but is merely a graphical front end to the command line interface diff utility.

Contents

It is a standard KDE SC tool, it comes packaged with the kdesdk module.

Comparing text files

Kompare displays the two compared files next to each other in a way that corresponding lines are always positioned as near to each other as possible, independent of the position of the scrollbar. Lines that are different in the compared files are highlighted in both file views. Three different colors are used for highlighting, indicating whether the highlighted passage either

Other features of Kompare

An incomplete list of features Kompare supports additionally to comparing text files follows.

Comparing directories

When two directories are chosen to be compared instead of two text files, Kompare displays a directory tree for both selected directories, which contains only pairs of corresponding files and directories that are not equal in the two compared directories. Clicking on an entry displays a comparison of the two selected files.

Creating and applying patches

Kompare is able to create a patch file which lists only the differences between two compared text files A and B. Further, Kompare can apply a patch file which was created this way to an original file A and, in this manner, recompute the contents of the corresponding file B. This is a comfortable utility for passing a corrected version of a file to a friend who already has an older version of the same file, because only the (relatively small) patch file has to be delivered and the receiver can generate the corrected file by applying the patch to the original file.

The patches created and applied by Kompare are compatible with patch files generated or applied by the command line interface diff utility, because Kompare is in fact merely a graphical front end to diff and the patches are created and applied by patch, which gets called by Kompare.

See also

Related Research Articles

In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The utility displays the changes in one of several standard formats, such that both humans or computers can parse the changes, and use them for patching.

patch (Unix)

The computer tool patch is a Unix program that updates text files according to instructions contained in a separate file, called a patch file. The patch file is a text file that consists of a list of differences and is produced by running the related diff program with the original and updated file as arguments. Updating files with patch is often referred to as applying the patch or simply patching the files.

The following tables compare general and technical information for a number of notable file managers.

diff3 is a Unix utility to compare three files and show any differences among them. diff3 can also merge files, implementing a three-way merge.

ExamDiff Pro

ExamDiff Pro is a commercial software utility for visual file and directory comparison, for Microsoft Windows.

WinMerge

WinMerge is a free software tool for data comparison and merging of text-like files. It is useful for determining what has changed between versions, and then merging changes between versions.

Merge (version control)

In version control, merging is a fundamental operation that reconciles multiple changes made to a version-controlled collection of files. Most often, it is necessary when a file is modified on two independent branches and subsequently merged. The result is a single collection of files that contains both sets of changes.

NetworkManager

NetworkManager is a daemon that sits on top of libudev and other Linux kernel interfaces and provides a high-level interface for the configuration of the network interfaces.

This article compares computer software tools which are used for accomplishing comparisons of files of various types. The file types addressed by individual file comparison apps varies, but may include text, symbols, images, audio, or video. This category of software tool is often called "file comparison" or "diff tool", but those effectively are equivalent terms — where the term "diff" is more commonly associated with the Unix diff utility.

File comparison

In computing, file comparison is the calculation and display of the differences and similarities between data objects, typically text files such as source code.

A desktop environment is a collection of software designed to give functionality and a certain look and feel to an operating system.

The Debian build toolchain is a collection of software utilities used to create Debian source packages (.dsc) and Debian binary packages from upstream source tarballs.

Beyond Compare is a data comparison utility. Aside from comparing files, the program is capable of doing side-by-side comparison of directories, FTP and SFTP directories, Dropbox directories, Amazon S3 directories, and archives. It is available for Windows, Mac OS, and Linux operating systems. A strength of Beyond Compare is that it can be configured as difftool and mergetool of version control systems, such as git.

In computer science and information theory, data differencing or differential compression is producing a technical description of the difference between two sets of data – a source and a target. Formally, a data differencing algorithm takes as input source data and target data, and produces difference data such that given the source data and the difference data, one can reconstruct the target data.

Compare++ is an auxiliary tool for programmers and Web developers. The tool can syntax-aware compare text files and folders quickly, do 3-way merge. It is useful to detect differences of codes and match. In the review of Softsea in the June 2, 2010, Compare++ was awarded 5 stars rating. Compare++ runs on Microsoft Windows and is compatible with Windows 7.

Meld (software)

Meld is the visual diff and merge tool of GNOME, targeted at developers. It allows users to compare two or three files or directories visually, color-coding the different lines.

Unified Code Count (UCC)

The Unified Code Counter (UCC) is a comprehensive software lines of code counter produced by the USC Center for Systems and Software Engineering. It is available to the general public as open source code and can be compiled with any standard ANSI C++ compiler.

Guiffy SureMerge is a data comparison utility. In addition to comparing files, the program is capable of doing side-by-side comparison of directories and archives. The program is also capable of performing automatic 3-way file merges. It is available for Windows, Mac OS, Linux, and Unix operating systems.

Double Commander

Double Commander is a free and open-source multi-platform two-panel orthodox file manager that is inspired by the Microsoft Windows-only Total Commander.

KDE Applications Set of applications and supporting libraries

The KDE Gear is a set of applications and supporting libraries that are developed by the KDE community, primarily used on Linux-based operating systems but mostly multiplatform, and released on a common release schedule.

References

  1. "KDE Gear 21.04.3". KDE . Retrieved 13 July 2021.