zlib supports -1 as a compression level, basically setting the compression to 6 (current default). It should be straightforward in libdeflate_alloc_compressor_ex:
if (compression_level == -1)
compression_level = 6;
This way the library will define the default, and the user can rely on that default.