New protobuf format and fix for sampling with step size 1.