geforkt von Mirrors/Velocity
b3bd773fea
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. |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
compile-linux.sh | ||
compile-osx.sh | ||
README.md |
velocity-natives
This directory contains native acceleration code for Velocity, along with traditional Java fallbacks.
Compression
- Supported platforms: macOS 10.13, Linux amd64 (precompiled binary is built on Debian 9 with JDK 8)
- Rationale: Using a native zlib wrapper, we can avoid multiple trips into Java just to copy memory around.
Encryption
- Supported platforms: macOS 10.13, Linux amd64
- Rationale: Using a C library for encryption means we can limit memory copies. Prior to Java 7, this was the only way to use AES-NI extensions on modern processors, but this is less important since JDK 8 has native support.
- Note: Due to U.S. restrictions on cryptography export, this native is provided in source code form only for now.
OS support
If you are on Alpine Linux, apk add libc6-compat
will enable native support.