zlib

Flushing a boost::iostreams::zlib_compressor. How to obtain a "sync flush" ?

Is there some magic required to obtain a "zlib sync flush" when using boost::iostreams::zlib_compressor ? Just invoking flush on the filter, or strict_sync on a filtering_ostream containing it doesn't see to do the job (ie I want the compressor to flush enough that the decompressor can recover all the bytes consumed by the compressor so...

Decompress PNG using zlib

Hi All, How can I use zlib library to decompress a PNG file? I have no idea how to read a PNG file. When I opened a PNG file in TextPad(a text editor), the data was not at all understandable. Is it because a PNG file is compressed? Any help is greatly appreciated. I need to read a PNG file using a C program and gcc compiler. Regards,...

c#/.Net Unzip a file with Zlib1.dll

Hi Is it possible to extarct a ".zip" file using Zlib1.dll in the c#/.Net? Regards Raju ...

zLib on iPhone, stop at first BLOCK

I am trying to call iPhone zLib to decompress the zlib stream from our HTTP based server, but the code always stop after finishing the first zlib block. Obviously, iPhone SDK is using the standard open Zlib. My doubt is that the parameter for inflateInit2 is not appropriate here. I spent lots of time reading the zlib manual, but it is...

Can zlib.crc32 or zlib.adler32 be safely used to mask primary keys in URLs?

In Django Design Patterns, the author recommends using zlib.crc32 to mask primary keys in URLs. After some quick testing, I noticed that crc32 produces negative integers about half the time, which seems undesirable for use in a URL. zlib.adler32 does not appear to produce negatives, but is described as "weaker" than CRC. Is this method...

Ruby zlib deflate massive data

I'm trying to use Zlib::Deflate.deflate on a massive file (4 gigs). There are obvious problems with doing that, the first of which being that I can't load the entire file into memory all at once. Zlib::GzipWriter would work, since it works with streams, but it's not zlib compression. Any ideas? ...

Difference between mod_deflate and zlib output_compression

Can anyone tell me the difference between using mod_deflate and zlib output_compression? I understand that zlib is done in PHP and mod_deflate is done in Apace, my .htaccess file looks like: php_flag zlib.output_compression On or: SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-...

Qt quncompress gzip data

Hello, I stumble upon a problem, and can't find a solution. So what I want to do is uncompress data in qt, using qUncompress(QByteArray), send from www in gzip format. I used wireshark to determine that this is valid gzip stream, also tested with zip/rar and both can uncompress it. Code so far, is like this: static const char dat...

How to keep g++ from taking header file from /usr/include?

I am building using zlib.h which I have a local copy to v1.2.5, but in /usr/include/zlib.h there is v1.2.1.2. If I omit adding -I/my/path/to/zlib to my make I get error from using old version which doesn't have Z_FIXED: g++ -g -Werror -Wredundant-decls -D_FILE_OFFSET_BITS=64 -c -o ARCH.linux_26_i86/debug/sysParam.o sysParam.cpp sysPara...

how to zip folder and its content using zlib under cocoa framework

Hi, How can i zipped folder and its content using zlib 1.2.3 under cocoa framework. It seems that zlib is used for only zipping files and not folder(with reference from other mailing list), else is there any possibility to do so in cocoa application. Thanks and Regards, iSight ...

Problem when compressing SWF in Linux with java.util.zip

Hi! I've created a servlet that changes the binaries of a SWF file and output it to the user. The SWF is compressed by ZLIB by default. Then I inflate, change the binaries, deflate and output the result. Everything was running right on a Windows Server 2008 (also in 2003). Currently, we need change the server to Linux, and then, this s...

Zlib not available in OS X?

I am trying to install a python library and receive this error after downloading an egg file. Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c7-py2.5.egg Traceback (most recent call last): File "setup.py", line 10, in <module> use_setuptools(min_version=min_version) File "/Users/tylo/Downloads/Archive...

error LNK2019 for ZLib sample code compiling.

Hello. I created win32 console application in vs2010 (without select the option of precompiled header). And I inserted the code below. but *.obj link failed. Could you provide me more information about the error. I searched MSDN, but still can't understand it. #include <stdio.h> #include "zlib.h" // Demonstration of zlib utility funct...

Zlib compression in boost::iostreams not compatible with zlib.NET

Hello, I want to send compressed data between my C# to a C++ application in ZLIB format. In C++, I use the zlib_compressor/zlib_decompressor available in boost::iostreams. In C#, I am currently using the ZOutputStream available in the zlib.NET library. First of all, when I compress the same data using both libraries, the results look di...

zlib gzgets extremely slow?

I'm doing stuff related to parsing huge globs of textfiles, and was testing what input method to use. There is not much of a difference using c++ std::ifstreams vs c FILE, According to the documentation of zlib, it supports uncompressed files, and will read the file without decompression. I'm seeing a difference from 12 seconds using ...

Sphinx search: failed to unpack mysqlcompress column

I have compiled sphinx 0.9.9 for debian x64. When I try to index using unpack_mysqlcompress, I get this error: "WARNING: failed to unpack column 'page_text', error=-5" The 'page_text' field is around 5Kb, and unpack_mysqlcompress_maxsize is set to 64M, yet the zlib manual says error -5 indicates Z_BUF_ERROR. Also if mysql does the deco...

How do you use zlib to inflate a large file?

I am having trouble unzipping a 4mb(40mb uncomporessed) file on the iPhone. I have found many solutions, but none of them seem to work. They all rely on the zlib package, and now I am trying to use zlib directly. It would be great if someone could point me to a simple explanation/example of how to use it, as the documentation is thin ...

Building cURL & libcurl with Visual Studio 2010

With the help of question #197444, I have managed to build cURL & libcurl from source on Windows from within the Visual Studio 2010 IDE, OpenSSL 1.0.0, and zlib 1.2.5. The problem I see is that at the moment, if I run the resulting curl.exe with the argument -V, then the version that it report is curl 7.20.1 (i386-pc-win32) libcurl/7.20...

Static libpng link with visual studio 2010

Hey guys. I'm trying to add PNG support to my application and thus I want to include libpng. I know it needs zlib and thus I downloaded that as well. I went into the png folder/projects/vstudio and I opened the solution. I compiled it and it went just fine. I added some headers from it into my application and I copied the lib files. My ...

Postgres' text column doesn't like my zlib compressed data.

Is there a better data type to be using to store a zlib compressed string in Postgresql? ...