Hit*_*Joe 5 java compression algorithm haxe exception
Is there any Brotli Java implementation with example? I found Brotli Java port and also Brotli lib on maven.
byte[] form= Files.readAllBytes(new File("filepath").toPath());
Brotli brotlic = new Brotli("filepath");
var compressedbytearray = brotlic.compressArray(form, 1);
System.out.println(compressedbytearray);
Run Code Online (Sandbox Code Playgroud)
After downloading both files, the above code gives me this error
Exception in thread "main" java.lang.ClassCastException: class [B cannot be cast to class haxe.root.Array ([B is in module java.base of loader 'bootstrap'; haxe.root.Array is in unnamed module of loader 'app')
Run Code Online (Sandbox Code Playgroud)
I just want to compress files using Brotli compression in java.