Switch out Cloudflare zlib for libdeflate.

libdeflate is significantly faster than vanilla zlib, zlib-ng, and Cloudflare zlib. It is also MIT-licensed (so no licensing concerns). In addition, it simplifies a lot of the native code (something that's been tricky to get right).

While we're at it, I have also taken the time to fine-time compression in Velocity in general. Thanks to this work, native compression only requires one JNI call, an improvement from the more than 2 (sometimes up to 5) that were possible before. This optimization also extends to the existing Java compressors, though they require potentially two JNI calls.
This commit is contained in:
Andrew Steinborn
2020-05-24 10:56:26 -04:00
parent 742b8d98cb
commit b3bd773fea
19 changed files with 173 additions and 349 deletions

1
.gitignore vendored
View File

@@ -90,3 +90,4 @@ plugins/
native/mbedtls
native/zlib-ng
native/zlib-cf
native/libdeflate