Link
Skip to main content

Compress Data in Java with Brotli

The JDeli Java image compression library includes a filter option to data in Java to reduce its size. The filter is written in 100% Java with no dependencies.

Key information:

  • 100% Java solution. No dlls or dependencies on native code
  • can be done in memory or on disk

How to data in Java :

final BrotliFilterOptions options = new BrotliFilterOptions();
options.setMode(FilterOptions.FilterMode.COMPRESS);
JDeli.filter(final byte[] raw_data, final BrotliFilterOptions options);

or

final BrotliFilterOptions options = new BrotliFilterOptions();
options.setMode(FilterOptions.FilterMode.COMPRESS);
JDeli.filter(final InputStream inputStream, final BrotliFilterOptions options, final OutputStream outputStream);

or you can use the specific OutputStream

final BrotliOutputStream outputStream = new BrotliOutputStream(outputstream);
    outputStream.write(originalBytes);

BrotliOutputStream Javadoc

FilterOptions allows setting of any supported Filter Options


Why JDeli?

  • Support image formats such as AVIF, HEIC and JPEG XL that are not supported in Java.
  • Process images up to 3x faster than ImageIO and alternative Java image libraries.
  • Prevent JVM crashes caused by native code in other image libraries such as ImageIO.
  • Handle JPEG, PNG, TIFF image file formats fully in Java.
  • Keep your Image files secure as JDeli makes no calls to any external system or third party library.

Learn more about JDeli

Start Your Free Trial