optimized t1 encoding