Decompress Brotli Data in Java
JDeli includes a filter option to decompress data in Java which was compressed using the Brotli algorithm. The decompress 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 decompress data in Java :
final BrotliFilterOptions options = new BrotliFilterOptions();
options.setMode(FilterOptions.FilterMode.DECOMPRESS);
JDeli.filter(final byte[] raw_data, final BrotliFilterOptions options);
or
final BrotliFilterOptions options = new BrotliFilterOptions();
options.setMode(FilterOptions.FilterMode.DECOMPRESS);
JDeli.filter(final InputStream inputStream, final BrotliFilterOptions options, final OutputStream outputStream);
FilterOptions allows setting of any supported Filter Options
Frequently Asked Questions
Is there an easy way to remove Brotli compression from data in Java?
Yes. Pass the data to JDeli.filter with BrotliFilterOptions set to DECOMPRESS, as shown above. If you need the data compressed again in a more widely supported format, you can recompress it with Flate (see Deflate data in Java). JDeli does not read PDF files (JDeli PDF support). To open PDF files that use Brotli compression, use JPedal, which added Brotli support in 2026.05.
Does JDeli’s Brotli decoder need native libraries?
No. The Brotli filter is written in 100% Java with no native code, unlike JNI-based Brotli libraries. See JDeli filters for the other pure Java filters.
Can JDeli decompress large Brotli files without loading them into memory?
Yes. Use the JDeli.filter(InputStream, BrotliFilterOptions, OutputStream) method shown above to stream the data. You can also use BrotliInputStream directly.
Which version of JDeli added Brotli support?
Brotli decompression was added in JDeli 2026.05 (JDEL-787). See the 2026.05 release notes.