Optical quantization based on soliton self-frequency shift and a flexible spectrum compression scheme utilizing time-dependent filtering.