In my opinion, the HTC is the best over the Samsung. This is due to the superior features exhibited by the HTC. It has better overall connectivity, supports 4G network and other features that are not in the Samsung.
Samsung is far better when it comes to quality. I'm assuming your debating the HTC one vs a galaxy. I recommend any Galaxy device, when it comes to the manufacturing any Samsung device is superior to an HTC.