Skip to content

Commit 2cd58f1

Browse files
authored
Merge pull request #432 from gyorokpeter/zlib_instructions
remove link to outdated zlib dll and add build instructions
2 parents 4b704d7 + 2951771 commit 2cd58f1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/kb/file-compression.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,14 @@ The following libraries are required by kdb+:
250250

251251
| :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
252252
---|---|---
253-
libz.so.1 | libz.dylib<br>(pre-installed) | zlibwapi.dll<br>(32-bit and 64-bit versions available from [WinImage](http://www.winimage.com/zLibDll/index.html "winimage.com"))
253+
libz.so.1 | libz.dylib<br>(pre-installed) | zlibwapi.dll
254+
255+
The Windows DLL should be built from the source code. Note that the out-of-the-box build files produce a DLL with the `cdecl` calling convention, which will not work in kdb+. To switch to the required `stdcall` convention, you must define the `ZLIB_WINAPI` preprocessor symbol. For example, with MinGW:
256+
```cmd
257+
>make -f win32/Makefile.gcc --eval 'kx-dummy:;@echo $(CFLAGS)'
258+
-O3 -Wall
259+
>make -f win32/Makefile.gcc CFLAGS="-O3 -Wall -DZLIB_WINAPI" SHARED_MODE=1 zlib1.dll
260+
```
254261

255262
Gzip has very good [compression ratio](compression/fsicasestudy.md) and average compression/decompression speed. Avoid high compression levels (like 8 and 9) if write speed is important for you. Gzip with level 5 is a good general solution.
256263

0 commit comments

Comments
 (0)