A nanoscale DNA force spectrometer capable of applying tension and compression on biomolecules