Class Utils
- java.lang.Object
-
- com.aayushatharva.brotli4j.common.Utils
-
public final class Utils extends java.lang.ObjectUtilities class for Brotli4j
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intmaxCompressedSize(int input_size)Returns the maximum compressed size for the given input size.
-
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException- If the input size is negative.
-
-