/// <summary> /// Splits the given context to several data arrays using the global RecordMarker metadata. /// </summary> /// <param name="configuration">the configuration to use</param> /// <param name="context">the binary context to work with</param> /// <returns>the result of splitting.</returns> public List<byte[]> Split(Configuration configuration, BinaryContext context) { var result = new List<byte[]>(); byte[] marker = RetrieveMarker(configuration, context); var positions=context.FindMarkers(marker); for (int i = 0; i < positions.Count; i++) { var index = positions[i]; var prevIndex = (i-1<0)?0:positions[i - 1]; var recordSize = index - prevIndex; if(context.CanReadBytes(recordSize+marker.Length)) { } } return result; }