Re: [xml] Question about memory constraints when using SAX parser



Isn't there already Aleksey Sanins xmlsec lib at:
http://www.aleksey.com/xmlsec/

Stefan

Veiko Sinivee wrote:
Hi,

I'm writing a digital signature and xml encryption library. I want
to support encryption & decryption of very large files too. Well
encryption goes fine because I read, encrypt, base64 encode and write
data to the file in blocks of 8 KB or so. For decryption I choose to use
the SAX interface because it's probably the fastest and requires the 
least amount of memory. Now I found, that xmlCharaters() callback
function is still called with a lot of data. Earlier versions of libxml2
used to return data in blocks of x KB. Now If I have something like:

<CipherData>
...
700 MB of base64 encoded data here
...
</CipherData

then the parser attempts to collect all of that data and return it
in one event to my callback function. This obviously doesn't work.
How can I switch it out and tell the parser to return at most x KB
in any event ?

regards,

Veiko Sinivee

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml


-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -

Attachment: kost.vcf
Description: Vcard



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