zlib uncompress returns -5 on Ubuntu 10.10 x64 (g++ -m64) -
i use python , zlib compress buffer, , uncompress in c++ program.
if build program g++ -m32, can uncompress buffer.
if build g++ -m64 (and link same option), returns -5 (z_buf_error).
can fix ? should change size of buffer ?
i allocate output buffer exact size, should align on 64 bits or ?
thanks.
i ran kind of problems. had software running fine when compiled in 32bits (even if run on 64bits system) returning same z_buf_error uncompress() when compiling 64bits environment (using -m64)
the compressed data checked: read compressed file software dumped in file again , compared, no differences.
so conclusion problem coming zlib itself. ubuntu 10.4 repositories seem provide zlib version 1.2.3. zlib home page provides version 1.2.5 (with notes better portability).
hope helps.
edit: moved using uncompress() inflate() , fixed our problem 64bits architecture. still don't know if uncompress() working 64bits systems newer (>1.2.3) version of zlib thus. workaround ok if using zlib-1.2.3 / 64bits.
Comments
Post a Comment