skip to main content
article
Free access

A technique for isolating differences between files

Published: 01 April 1978 Publication History

Abstract

A simple algorithm is described for isolating the differences between two files. One application is the comparing of two versions of a source program or other file in order to display all differences. The algorithm isolates differences in a way that corresponds closely to our intuitive notion of difference, is easy to implement, and is computationally efficient, with time linear in the file length. For most applications the algorithm isolates differences similar to those isolated by the longest common subsequence. Another application of this algorithm merges files containing independently generated changes into a single file. The algorithm can also be used to generate efficient encodings of a file in the form of the differences between itself and a given “datum” file, permitting reconstruction of the original file from the diference and datum files.

References

[1]
Aho, A., Hirschberg, D., and Ullman, J. Bounds on the complexity of the longest common subsequence problem. J. ACM 23, 1 (Jan. 1976), 1-12.
[2]
Deutsch, P., and Lampson, B. An online editor. Comm. ACM 10, 12 (Dec. 1967), 793-799.
[3]
Digital Equipment Corp. DEC System 10 Assembly Language Handbook, 3d ed., 1972, pp. 931-942.
[4]
Fajman, R., and Borgelt, J. WYLBUR: An interactive text editing and remote job entry system. Comm. ACM 16, 5 (May 1973), 314-322.
[5]
Heckel, P. A technique for isolating differences between files. Tech. Pub. 73, Interactive Systems Consultants, Palo Alto, Calif.
[6]
Hirschberg, D. A linear space algorithm for computing maximal common subsequences. Comm. ACM 18, 6 (June 1975), 342-343.
[7]
Hunt, J., and McIlroy, M. An algorithm for differential file comparison. Compt. Sci. Techn. Rep. 41, Bell Telephone Labs, Murray Hill, N.J., Aug. 1976.
[8]
IBM Corp. IBM Virtual Machine Facility/370 Command Language Guide for General Users, Release 2,225-226.1 (UPDATE).
[9]
Knuth, D.E. The Art o f Computer Programming, Vol. 3: Sorting and Searching. Addison-Wesley, Reading, Mass., 1973, p. 509.
[10]
Wagner, R., and Fischer, M. The string-to-string correction problem. J. ACM 21, 1 (Jan. 1974), 168-173.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 21, Issue 4
April 1978
73 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/359460
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 April 1978
Published in CACM Volume 21, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. bandwidth compression
  2. difference isolation
  3. file comparison
  4. file compression
  5. hashcoding
  6. longest common subsequence
  7. molecular evolution
  8. program maintenance
  9. text editing
  10. word processing

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)621
  • Downloads (Last 6 weeks)96
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media