Previous | Next | (P-PDF) Developers
Topic: ZLIB QUESTION
Conf: (P-PDF) Developers, Msg: 31782
From: aandi
Date: 12/19/2001 06:37 AM
There is an unlimited increase in size (or at least very large). In general you do not pre-allocate the buffer, but use zlib to decompress in stages. If you must have all the information in memory (and there is potentially hundreds of megabytes in an uncompressed image), then use realloc when the buffer becomes full. I would typically start with a 4K buffer and double the size each time it becomes full, but algorithm analysis may reveal a better method.