parallelize encode and decode

per block.