How is electrolysis technology is helpful in reducing the TDS?

Can someone tell me how the electrolysis technology is helpful in reducing the TDS? Can it also be helpful in removing hardness of water? Our water is also detected with sulfur content - what should we do?