Design of efficient all-optical code-division multiplexing systems supporting multiple-bit-rate and equal-bit-rate transmissions