Курсовая работа: Методы сжатия цифровой информации Метод Лавинского
begin
AssignFile(inf,fopen.Filename);
Reset(inf);
inpos:=0;
AssignFile(outf,fsave.Filename);
Rewrite(outf);
inpos:=0;
while not(eof(inf)) do
begin
read(inf,tmp);
inc(inpos);
Seek(inf,inpos);
granica:=ord(tmp);
for k:=1 to 3 do
begin
read(inf,inbuf[k]);
inc(inpos);
Seek(inf,inpos);
end;
temp:='';
for k:=1 to 3 do
temp:=temp+dectobin(ord(inbuf[k]));
massive:=bin24todec24(temp);
chislo:=massive+granica*150;
write(outf,inttostr(chislo),' ');
end;
closefile(outf);
closefile(inf);
end;