resurrect varint encode