airlift / aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Apache License 2.0
562 stars 111 forks source link

Use Unsafe to obtain location of direct Buffer address field #128

Closed martint closed 3 years ago

martint commented 3 years ago

Java 16 removed reflective access to internal fields in the java.nio.Buffer class to be able to operate on direct byte buffers, so resort to Unsafe as a stop gap.

We'll revisit this later, possibly when the Foreign-Memory Access API becomes final.

Fixes #125