Well, may be not exactly what you need, but use it as you see fit.
function LoadHexSpaceSeparatedFileIntoTBytes(aFileName: string): string;
var
i, c: Integer;
st: string;
LStingList: TStringList;
begin
LStingList := TStringList.Create;
try
LStingList.LineBreak := ' ';
LStingList.LoadFromFile(aFileName);
SetLength(Result, LStingList.Count);
c := 1;
for i := 0 to LStingList.Count - 1 do
begin
st := Trim(LStingList.Strings[i]);
if (st <> '') and (Length(st) = 2) then
begin
HexToBin(PChar(@st[1]), PChar(@Result[c]), 1);
Inc(c);
end;
end;
SetLength(Result, c);
finally
LStingList.Free;
end;
end;
Quick use of StringList to separate the values, of course you can parse it on your own and even skip the usage of HexToBin altogether by using your own.