Re: [Gambas-user] Binary compare of files?

2008-10-19 Thread Kari Laine
On Sun, Oct 19, 2008 at 7:02 AM, nando [EMAIL PROTECTED] wrote: You want to use the code below, Hi nando, Ok what code you mean? but use a large block size like 8192 or 32768. It doesn't have to be a perfect binary size. I suggest not to use SHA or MD5 because if you're reading in the

Re: [Gambas-user] Binary compare of files?

2008-10-19 Thread Doriano Blengino
Kari Laine ha scritto: On Sun, Oct 19, 2008 at 7:02 AM, nando [EMAIL PROTECTED] wrote: but use a large block size like 8192 or 32768. It doesn't have to be a perfect binary size. True, it does not have to be a perfect power of two, but I suspect that good boundaries optimize disk

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Doriano Blengino
Kari Laine ha scritto: Hi All, could someone please give me a hint how compare two files for binary equality? I am doing it now int by int basis and it is taking years. I would like to read big chunks of both files and compare. Also I am thinking a possibility to read whole files in memory

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Stefano Palmeri
Il venerdì 17 ottobre 2008 08:18:20 Doriano Blengino ha scritto: Kari Laine ha scritto: Hi All, could someone please give me a hint how compare two files for binary equality? I am doing it now int by int basis and it is taking years. I would like to read big chunks of both files and

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Ron_1st
On Friday 17 October 2008, Stefano Palmeri wrote: If you only want to know if two files are identical, you could use md5sum. Ciao, Stefano A little misunderstanding of MD5. You know for _*_sure_*_ if the SUM differs they are not equal. You may _*_assume_*_ they like the same if the

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Stefano Palmeri
Il venerdì 17 ottobre 2008 10:28:28 Ron_1st ha scritto: On Friday 17 October 2008, Stefano Palmeri wrote: If you only want to know if two files are identical, you could use md5sum. Ciao, Stefano A little misunderstanding of MD5. You know for _*_sure_*_ if the SUM differs they are

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Kari Laine
On Fri, Oct 17, 2008 at 5:44 PM, Kari Laine [EMAIL PROTECTED] wrote: On Fri, Oct 17, 2008 at 12:28 PM, Stefano Palmeri [EMAIL PROTECTED]wrote: Il venerdì 17 ottobre 2008 10:28:28 Ron_1st ha scritto: On Friday 17 October 2008, Stefano Palmeri wrote: If you only want to know if two files

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Doriano Blengino
Kari Laine ha scritto: On Fri, Oct 17, 2008 at 5:44 PM, Kari Laine [EMAIL PROTECTED] wrote: A little misunderstanding of MD5. You know for _*_sure_*_ if the SUM differs they are not equal. You may _*_assume_*_ they like the same if the sum is equal. Ok should have looked

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Kari Laine
On Fri, Oct 17, 2008 at 7:21 PM, Doriano Blengino [EMAIL PROTECTED] wrote: So, choose the algorithm which gives you more bytes as possible. Well, some algorithm is more oriented to checksumming, some to guarantee security (difficult to break); probably checksumming ones are faster; perhaps

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Ron_1st
On Friday 17 October 2008, Kari Laine wrote: On Fri, Oct 17, 2008 at 5:44 PM, Kari Laine [EMAIL PROTECTED] wrote: On Fri, Oct 17, 2008 at 12:28 PM, Stefano Palmeri [EMAIL PROTECTED]wrote: Il venerdì 17 ottobre 2008 10:28:28 Ron_1st ha scritto: On Friday 17 October 2008, Stefano Palmeri

Re: [Gambas-user] Binary compare of files?

2008-10-17 Thread Kari Laine
On Fri, Oct 17, 2008 at 9:11 PM, Ron_1st [EMAIL PROTECTED] wrote: On Friday 17 October 2008, Kari Laine wrote: On Fri, Oct 17, 2008 at 5:44 PM, Kari Laine [EMAIL PROTECTED] wrote: On Fri, Oct 17, 2008 at 12:28 PM, Stefano Palmeri [EMAIL PROTECTED]wrote: Il venerdì 17 ottobre 2008

[Gambas-user] Binary compare of files?

2008-10-16 Thread Kari Laine
Hi All, could someone please give me a hint how compare two files for binary equality? I am doing it now int by int basis and it is taking years. I would like to read big chunks of both files and compare. Also I am thinking a possibility to read whole files in memory at once and then compare.