cmp: a pedestrian yet very fast file comparator

版本 1.0.0.0 (3.1 KB) 作者: us
CMP compares two files byte by byte
2.6K 次下载
更新时间 2007/4/11

查看许可证

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.

引用格式

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. 检索来源 .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 File Name Construction 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0