Class Utils
java.lang.Object
com.aayushatharva.brotli4j.common.Utils
Utilities class for Brotli4j
-
Method Summary
Modifier and TypeMethodDescriptionstatic intmaxCompressedSize(int input_size) Returns the maximum compressed size for the given input size.
-
Method Details
-
maxCompressedSize
public static int maxCompressedSize(int input_size) Returns the maximum compressed size for the given input size. This method is based on the original implementation of the Brotli library and works only for direct compression, not stream compression. This is useful to allocating buffers for compressed data.- Parameters:
input_size- The input size.- Returns:
- The maximum compressed size.
- Throws:
IllegalArgumentException- If the input size is negative.
-