brill this looks like the sort of thing I was after! Can i just check i know how this works first to make sure I just dont jump into things head first. I'm not toally sure what is occuring inside the loop and how its happening but I think i know whats going on just not how its doing it.
One thing is that the first byte of each block tells me how much the block size has to be, so for example i read the first byte, i work out that corresponds to 96 then i need to pass the 96 back to my loop somehow to say, i need 96 bytes and move my next chunk to start at the 97 byte to start the process all over again
Code:
int pos=0; //increments everytime it is passed a new block size
int stop = 16384; //max of my loop
while(pos<stop)
{
void *block; //not sure what this does
unsigned int blockSize = getNextBlock(block,pos); //not sure what this does
processBlock(block,blockSize); //not sure what this does
pos+=blockSize; //Adding the block size to variable pos to increment its value?
}
thanks