Menu

#44 zlib support

open
nobody
None
6
2009-04-15
2009-04-09
No

Please find attached the changes to add zlib support. This enables to read and write gzip-ed/zlib-ed xml data. The changes were made against version 2.5.3.

Discussion

  • Alois Schloegl

    Alois Schloegl - 2009-04-15

    There are some glitches with the pre-processor flag, there is also a bug when compiling with MinGW g++ V3.4.2. Therefore, I upload the revised version again. You need to compile with -D=WITH_ZLIB

    Currently, read of gzipped-xml data seems to work fine, writing is only partially working. Specifically, the method
    void TiXmlText::gzPrint( gzFile cfile, int depth ) const

    seems to produce just an empty field, I do not know why.

    Alois

     
  • Alois Schloegl

    Alois Schloegl - 2009-04-15
    • priority: 5 --> 6
     
  • Alois Schloegl

    Alois Schloegl - 2009-04-15
     
  • Alois Schloegl

    Alois Schloegl - 2009-04-15
     
  • Alois Schloegl

    Alois Schloegl - 2009-04-15

    The problem is solved. Compile with -D=WITH_ZLIB, and you can save an gzipped xml-file with

    SaveFile(char *filename, int compression);
    compression be any integer from 0 (no compression) to 9 (most compression). SaveFile(filename, 0) is the same as SaveFile(filename);

    LoadFile(filename) will load compressed and uncompressed XML-files.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.