function SizeToStr(const Size : int64) : string;
begin
if Size < $000000000400 then
result := format('%d bytes',[Size])
else
if Size < $000000100000 then
result := format('%.1f Kb',[Size/$000000000400])
else
if Size < $000040000000 then
result := format('%.1f Mb',[Size/$000000100000])
else
if Size < $010000000000 then
result := format('%.2f Gb',[Size/$000040000000])
else
result := format('%.2f Tb',[Size/$010000000000])
end;