I agree with Torbjorn. For base 256 conversion, the function mpz_getnth_ui he proposes is far better than the current mpz_getlimbn, because of the possible internal use of nails... But for base-256 conversion, mpz_export is perfect. -- Torbjörn