From the zlib home page, zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.
This blog entry describes the process of building zlib v1.2.8. For this build description, there are two special build considerations: a) I want to unzip from memory, and b) a 64 bit masm is not included with Visual Studio 2012.
At minizip, I found a reference to Justin Fletcher who "wrote a very simple implementation of a memory access method for the ioapi code". I made a few edits to handle 64 bit builds. The files can be found here: ioapi.7z. Unzip and place the two files into the ./zip-1.2.8 sub-directory.
To remedy the lack of a 64 bit assembler in Visual Studio 2012 for building the release version of zlib, one has to download a DDK (Device Driver Kit) from Microsoft. The file to download is 1830_usa_ddk.iso. Mount the ISO. Since I am not sure in which archive file the application resides, it is necessary to run the setup program, and install the DDK. Once the DDK is installed, the assembler will be found at "WINDDK\3790.1830\bin\win64\x86\amd64\ml64.exe".
The batch file in ./zlib-1.2.8\contrib\masmx64\bld_ml64.bat will need to be edited. Change ml64.exe on the two lines to reflect the full path to the ml64.exe file. Run the batch file to build the two object modules.
zlib-1.2.8\contrib\vstudio\vc11\zlibvc.sln can be opened with Visual Studio 2012. Add the 'ioapi_mem.c' into the file list for the zlibstat project. I ended up commenting out "#include "ioapi.h" in ioapi_mem.c, and in ioapi_mem.h, changing "#include "ioapi.h" to "#include "./contrib/minizip/ioapi.h" to get a good build.
Set zlibstat as the default project, set the project settings to release and x64, and then build. The resulting library will be residing in zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibStatRelease.
2019/04/13 Update using zlib v1.2.11.
Visual Studio 2019 includes ml64.exe. By starting a command prompt using the Visual Studio 2019 x64 Native Tools Command Prompt, the above mentioned bld_ml64.bat does not need to be modified. When in the zlib-1.2.11 directory, perform a cd contrib\masmx64, and run bld_ml64.bat. This will run the assembler. The Visual Studio Solution in contrib\vstudio\vc14 will link in the assembled object files.