A compact and miniaturized high resolution capacitance dilatometer for measuring thermal expansion and magnetostriction.