So sorry - user error on my part.  It works like a champ!
M.

On Wed, Jan 30, 2013 at 5:36 PM, Brian Gladman <[email protected]> wrote:

> On 30/01/2013 19:42, Mj Michaels wrote:
> > Hi Brian - Things were going pretty well for me, but I just discovered a
> > problem.  I need to be able to serialize an mpz_t value and pass it
> > between platforms where the size of limbs is not the same.  For example,
> > I need to take a byte stream representing a serialized mpz_t with 64-bit
> > words, and read it on win32 into an mpz_t that is 32 bit words.  Am I
> > out of luck?  I was hoping that mpz_import() would do the trick, since
> > it takes a size value, but this didn't just work.  Should it?  Are there
> > any other tricks up your sleeve for this?
>
> Can you say how it failed?
>
> I would be inclined to start with the simplest possible import/export
> using bytes:
>
>   mpz_export(buf, *count, 1, 1, 0, 0, mpz)
>
> and:
>
>   mpz_import(mpz, count, 1, 1, 0, 0, buf)
>
> Since it seems that the length of the data (i.e. count) has to be input,
> you need to recover this in some way on export so it can be used on import.
>
> Using bytes avoids a lot of issues with byte order and should work.  If
> it doesn't, I suspect something is broken.
>
>   Brian
>
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mpir-devel?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mpir-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to