[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BASE64



   David,
   As you mentioned in your e-mail, 'outsize' is the size of the output
   variable.  So if your output variable is 5mb, then  pass 5mb in
   outsize.   If you allocate memory to a pointer, 'outsize' should be the
   size of memory you allocated.
   You seem to know this already, so I'm not sure what you're asking?
   -SK

   On 1/29/2014 8:09 PM, David Baugh wrote:

   Hi folks,


   I'm getting a pdf using SOAP, then sending it through the BASE64
   decoder and saving it to file. It works fine as long as the pdf is
   small. I have my result variable outbuf defined as a large character
   string, which is not ideal but has worked so far since I know the PDF's
   I've been importing. Now I need to cater to larger PDF's.


   I'm setting theBASE64 output size is the size of that variable.


   From BASE64_H: OutSize = (input) size of area to store output in


   In order to cope with large PDF's (i.e. let's go crazy and say 5mb), If
   I define the output variable as a pointer in my program, how do I
   determine Outsize on the call to BASE64?


   Here's the snippet:


   outlen = base64_decode( value.buf

                         : value.len

                         : %addr(outbuf)

                         : %size(outbuf) );


        callp write(fd3: %addr(outbuf): outlen);


   Thanks,


   -David.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[1]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------