cmp: a pedestrian yet very fast file comparator

Version 1.0.0.0 (3,1 KB) von us
CMP compares two files byte by byte
2,6K Downloads
Aktualisiert 11 Apr 2007

Lizenz anzeigen

CMP compares two files byte by byte employing a speed and memory optimized engine.
if the files do not match, CMP prints/returns the position and the numerical and ASCII character representation of the first differing byte and its ten neighbors.

performance:

% create a file with 80 megabytes of random data
fnam='cmp_test.mat';
tmat=rand(1,10*2^20);
save(fnam,'tmat');
clear tmat;
tic;
r=cmp(fnam,fnam,'-b','-s');
toc
delete(fnam);

% wintel systems:
% 1) p5/1.6ghz/512mb/win2k/r2007a
% > elapsed time = 3.7021 seconds
% 2) p5/2.6ghz/512mb/winxp/r2007a
% > elapsed time = 2.1013 seconds
% 3) c2.2*2.4ghz/2gb/winvista/r2007a
% > elapsed time = 1.0190 seconds

see
> help cmp
and the screen shot for more information about this self-explanatory snippet and its few options.

Zitieren als

us (2024). cmp: a pedestrian yet very fast file comparator (https://www.mathworks.com/matlabcentral/fileexchange/14596-cmp-a-pedestrian-yet-very-fast-file-comparator), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu File Name Construction finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0