I have a multidimensional array Bytes, which is defined as follows:
type
TRow = array[0..6] of Byte;
var
All: array[0..19112079] of TRow;
Now I would like to create a unique checksum of each row that the array consists of and save to a file:
var
I: Integer;
begin
for I := 0 to 19112079 do
begin
Checksum := GenerateChecksum(All[I]);
Writeln(F, Checksum);
end;
end;
What should I do with the function GenerateChecksum()? I tried xorand CRC32, but they are not suitable for this task, as they return duplicate values. I would like to create a checksum unique for each line.
EDIT
Oh, the checksum should be calculated so that it allows you to compare strings. I would like to take two checksums from different lines and say one of them is larger than the other, smaller than the other, or equal. Is there a chance to achieve something like this?
EDIT2
:
Row x - 1: 120, 444, 323, 984, 1024, 76, 130
Row x: 120, 444, 323, 984, 1024, 76, 222
Row x + 1: 120, 444, 323, 984, 1024, 76, 121
. . .
Row x + n: 120, 444, 323, 984, 6333, 33, 935
.