safety belts
return the actual number of processed bytes

and not always the amount of data received as input
ensure destroying the contexts list in all fault paths