<br>Hi.<br><br>I'd like to convert an mpz_class or mpz_t number to a base 256, for it to fill a byte vector. But all the convertion functions only work until base 62. Any of you know another way of converting the base? My real problem is that I wanted to save the number in a file, but I realized that the GMP, even for integer (which is my application uses - only natural numbers, not signed), somewhat writes to the file (using mpz_out_raw) more than the bytes needs to be stored. Even though the difference is about bytes, its critical to my project that it writes to the file only the necessary bytes. Any ideas that could help me?
<br><br>Thanks in advance.<br><br>Detentor<br>