hello, i am completelt stuck and i have no idea how to proceed and hoping that you guys may help. using memcmp i loop through my file finding every instance of a search criteria and return its byte position in 'pos'. Everytime i get a return for pos, i want to start at that byte and stream the data into another file until i hit another search criteria. An example of my file could be blahblahblahblahblahblahSTART datadatadatadatadatadatadatadata STOPblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah blahblahblahblahblahblahblahblahblah START datadatadatadatadatadatadatadata STOP blah so far i loop through my file and return the byte position of each start fine. Could anyone help me to contruct a stream that starts at this position and streams the data until it reaches the end criteria I am using memcmp because the end criteria for each stop position is a hex string 0xFF, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 i would be EXTREMELY greatful for any help and can post the code i have if it will be of help?