Adaptive and compressive sampling