I ported pigz from Unix to Windows
11 comments
·June 20, 2025themadsens
I wish premake could gain more traction. It is the comprehensible alternative to Cmake etc.
beagle3
Xmake[0] is as-simple-as-premake and does IIRC everything Premake does and a whole lot more.
kjksf
Worth mentioning that this is only of interest as technical info on porting process.
The port itself is very old and therefore very outdated.
ZoomZoomZoom
Perhaps it's worth it adding this as a note at the top of the post, maybe mentioning alternatives, such as an Actually Portable™ build of `pigz`[1] or just a windows build of zstd[2].
lelandbatey
I don't think the port itself is very old. The latest version of original pigz seems to have been released in 2023 [1], and the port seems to be of pigz from around that time[2]
[1] - https://zlib.net/pigz/
kristianp
Repository link: https://github.com/kjk/pigz
jqpabc123
This is clearly aimed at faster results in a single user desktop environment.
In a threaded server type app where available processor cores are already being utilized, I don't see much real advantage in this --- if any.
null
GuinansEyebrows
depends on the current load. i've worked places where we would create nightly postgres dumps via pg_dumpall, then pipe through pigz to compress. it's great if you run it when load is otherwise low and you want to squeeze every bit of performance out of the box during that quiet window.
this predates the maturation of pg_dump/pg_restore concurrency features :)
I recently ported WebKit's libpas memory allocator[1] to Windows, which used pthreads on the Linux and Darwin ports. Depending on what pthreads features you're using it's not that much code to shim to Windows APIs. It's around ~200 LOC[2] for WebKit's usage, which a lot smaller than pthread-win32.
[1] https://github.com/WebKit/WebKit/pull/41945 [2] https://github.com/WebKit/WebKit/blob/main/Source/bmalloc/li...