<br>Hi.<br><br>I&#39;d&nbsp;like&nbsp;to&nbsp;convert&nbsp;an&nbsp;mpz_class&nbsp;or&nbsp;mpz_t&nbsp;number&nbsp;to&nbsp;a&nbsp;base&nbsp;256,&nbsp;for&nbsp;it&nbsp;to&nbsp;fill&nbsp;a&nbsp;byte&nbsp;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>