Hi.
Can anybody tell me what should return this function Sizeof(TSample)?
TSample = record
SampleA:
Smallint;
SampleB:
Smallint;
SampleC: Smallint;
SampleD: Smallint;
BasePos: Integer;
Base :
char;
QV : BYTE;
Gray : Boolean;
end; {Size= 2+2+2+2+ 4+ 1+ 1+ 1}
Why it returns 16 instead of 15?
It is because the data is aligned to word or double-word boundaries for
faster access?
How do I get the real size then?
I want to save a matrix called CromaMX (CromaMX = array of TSample ) to
disk using BlockWrite. How do I save it, without wasting disk space,
because it looks that if I use:
SizeChroma= Length(CromaMX)* sizeof(TSample);
BlockWrite(F, CromaMX[0], SizeChroma);
I will allocate too much space.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi