Construction and performance of network codes