ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Epiphanov Sergei <serpiph@nikiet.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] зеркало сизифа
Date: Thu, 6 Apr 2006 13:47:16 +0400
Message-ID: <200604061347.17100.serpiph@nikiet.ru> (raw)
In-Reply-To: <200604061158.22435.led@ukr-fin.com.ua>

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

В сообщении от Thursday 06 April 2006 12:58 Led написал(a):
> По крайней мере при правке спека без смены номера релиза и повторной
> заливке в incomig передаётся не более 5% от объёма src.rpm.

Вдогонку числа:

Исходный размер=23,193,521 байт
Архив1 (в маленьком файле 555)=2,918,177 байт
Архив2 (в маленьком файле 111)=2,918,148 байт

Из самописной программы:
Несовпадений=2,904,775
Архив1=2,918,177
Архив2=2,918,148
Минимум=2,918,148
Дельта=29
Разница=99,54%

Формула:
Разница=(Несовпадений+Дельта)*100/(Минимум+Дельта)

Программа для сравнения приложена.

-- 
С уважением, Епифанов Сергей

[-- Attachment #2: search.c --]
[-- Type: text/x-csrc, Size: 1128 bytes --]

#define _XOPEN_SOURCE 500

#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char **argv){
    int f1, f2, res;
    unsigned char c1, c2;
    unsigned long int l=0, pos, l1, l2, l3, l4;
    struct stat buf;
    
    f1=open("1.tar.bz2",O_RDONLY);
    if(f1 == -1){
	puts ("Err 1");
	exit(1);
    }
    f2=open("2.tar.bz2",O_RDONLY);
    if(f2 == -1){
	puts ("Err 1");
	exit(1);
    }
    
    fstat(f1, &buf);
    l1=buf.st_size;
    
    fstat(f2, &buf);
    l2=buf.st_size;
    
    if(l1 > l2){
	l3 = l2;
	l4 = l1-l2;
    } else {
	l3 = l1;
	l4 = l2-l1;
    }
    
    printf("мЕЯНБОЮДЕМХИ=%ld,юПУХБ1=%ld,юПУХБ2=%ld,лХМХЛСЛ=%ld,дЕКЭРЮ=%ld\n",l,l1,l2,l3,l4);
    
    for(pos=0; pos<l3;pos++)
    {
	pread(f1, &c1, 1, pos);
	pread(f2, &c2, 1, pos);
	if(c1 != c2){
	    printf("%8ld: %3d %3d %c %c\n",pos, c1, c2, c1>=32?c1:' ', c2>=32?c2:' ');
	    l++;
	}
    }
    
    printf("мЕЯНБОЮДЕМХИ=%ld,юПУХБ1=%ld,юПУХБ2=%ld,лХМХЛСЛ=%ld,дЕКЭРЮ=%ld\n",l,l1,l2,l3,l4);
    printf("пЮГМХЖЮ=%8.2f%%\n", (float)(l+l4)*100.0/(float)(l3+l4) );
}

  parent reply	other threads:[~2006-04-06  9:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-05 16:55 Artem Zolochevskiy
2006-04-05 17:58 ` Vladimir Lettiev
2006-04-05 18:08   ` Michael Shigorin
2006-04-05 18:53   ` Artem Zolochevskiy
2006-04-05 19:05     ` Vitaly Lipatov
2006-04-06  9:59     ` Igor Zubkov
2006-04-06 10:10       ` Epiphanov Sergei
2006-04-06 11:05         ` Andrey Rahmatullin
2006-04-06 13:26           ` Igor Zubkov
2006-04-06 13:24         ` Igor Zubkov
2006-04-06 10:12     ` Slava Dubrovskiy
2006-04-06  7:34   ` Slava Dubrovskiy
2006-04-06  7:59     ` Yuriy Kashirin
2006-04-06  8:02       ` Michael Shigorin
2006-04-06  8:13         ` Olvin
2006-04-06  8:14           ` Michael Shigorin
2006-04-06  8:27             ` Led
2006-04-06  8:42               ` Sviatoslav Sviridov
2006-04-06  9:00                 ` Led
2006-04-06  9:17                   ` Sviatoslav Sviridov
2006-04-06  8:56               ` Epiphanov Sergei
2006-04-06  8:58                 ` Led
2006-04-06  9:40                   ` Epiphanov Sergei
2006-04-15 19:45                     ` Michael Shigorin
2006-04-15 20:39                       ` Dmitry V. Levin
2006-04-15 21:30                         ` [sisyphus] [JT] gcc timestamps (was: зеркало сизифа) Michael Shigorin
2006-04-15 22:20                           ` Dmitry V. Levin
2006-04-06  9:47                   ` Epiphanov Sergei [this message]
2006-04-06  9:50                     ` [sisyphus] зеркало сизифа Led
2006-04-06 10:00                       ` Epiphanov Sergei
2006-04-06 10:02                         ` Igor Zubkov
2006-04-06 10:05                       ` Epiphanov Sergei
2006-04-06 10:39                         ` Led
2006-04-06  9:04           ` Damir Shayhutdinov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200604061347.17100.serpiph@nikiet.ru \
    --to=serpiph@nikiet.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git