Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Building for Windows without zlib?

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 27 Sep 2012 12:31:45 -0700
On Sep 27, 2012, at 7:53 AM, Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx> wrote:

> At one stage, building without zlib support meant that opening/reading files was much faster than with.

As Jakub indicated, we used to use zlib's I/O routines to read capture files, meaning that both compressed *and* uncompressed files were read through those routines; if not built with zlib, we just used the C standard I/O routines.

We haven't done that since, I think, 1.6; Jakub took some sample code that came with zlib, supporting fast random access (rather than "move backward by rewinding and moving forward", which is what zlib's I/O routines did), and made it work in Wiretap.  That code is used, albeit without the compressed-file support, even if built without zlib.

> There are 2 places in config.nmake that let you comment out the definition of ZLIB_DIR, so I commented out them both.
> The build went OK, but when I tried to run, an error would pop up saying that gzdirect couldn't be found in zlib1.dll.

That's odd, as there's nothing in Wireshark that calls gzdirect() (given that we no longer use zlib's I/O routines).