cmp: a pedestrian yet very fast file comparator

Versión 1.0.0.0 (3,1 KB) por us
CMP compares two files byte by byte
2,6K descargas
Actualizado 11 abr 2007

Ver licencia

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.

Citar como

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. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R14
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre File Name Construction en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0