How to read this type of file? lazarus / 8-Other ---------------------------------------------------------------------- rabbit · 2009-12-09 11:50 My data file is in this form : HeaderBlock+DataBlock.   Here Code: [Select]Header = Packed Record   StartingTime : TDateTime;   NumberOfData : longint;   end;     DataBlock : Block with NumberOfData bytes.   I suppose like this:     Take it as a typed file(file of Header), open and read one record from it,and close it.Then take it as a typed file(file of Byte), open and read NumberOfData records from it then close it. ---------------------------------------------------------------------- theo · 2009-12-09 12:46 I would take a TFileStream and then use ReadBuffer or ReadDWord etc. http://www.freepascal.org/docs-html/rtl/classes/tstream.html http://www.freepascal.org/docs-html/rtl/classes/tfilestream.html ---------------------------------------------------------------------- eny · 2009-12-09 18:42 Do you want to access all data sequentially? (In which case you could use a TFilestream.) Or do you want to access random header+data blocks?