base to bytes