Skip to content(if available)orjump to list(if available)

I ported pigz from Unix to Windows

I ported pigz from Unix to Windows

11 comments

·June 20, 2025

igrunert

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...

adzm

Never knew about the destructor feature for fiber local allocations!

themadsens

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.

[0] https://xmake.io/

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].

[1] https://cosmo.zip/pub/cosmos/tiny/pigz

[2] https://github.com/facebook/zstd/releases/latest/

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/

[2] - https://github.com/kjk/pigz/commits/master/

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

[deleted]

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 :)