Performance-improved all-optical RZ to NRZ format conversion using duplicator and wavelength converter