Using crc32 from the JUCE zlib

We wanted to use the JUCE supplied crc32 function but it seems like it’s not exposed via the juce_core module in which it lives. It’s only used by the GZIP classes and as such, the actual zlib implementation files are only included there in juce_GZIPDecompressorInputStream.cpp.

So to get access to it from my code I had to go:

#include "juce_core/zip/zlib/zlib.h"
#include "juce_core/zip/zlib/crc32.c"

Is it OK to be compiling the zlib C code like this? Is there some more “jucey” approach I have missed?

And yes, I’m aware that on Mac/lin I could use <zlib.h> and let the linker find the system zlib using -lz linker option. But AFAIK there’s no such library on Windows by default so the JUCE version is preferred.