public IEnumerable <IFrameable> Create(string fileName) { using (var fs = new FileStream(fileName, FileMode.Open)) { using (var br = new BinaryReader(fs)) { var frames = new List <IldFrame>(); while (true) { var header = new IldHeader(BytesConverter.ByteToType <IldHeaderRaw>(br)); if (header.FormatCode != 0) { return(frames); } if (header.TotalPoints == 0 || header.FrameNumber == header.TotalFrames) { return(frames); } var records = new List <IldRecord>(); while (true) { var record = new IldRecord(BytesConverter.ByteToType <IldRecordRaw>(br)); if (record.IsLast) { break; } records.Add(record); } var frame = new IldFrame(header, records, Transformation); frames.Add(frame); } } } }