Top Description Constructors Methods
com.aayushatharva.brotli4j.common

public final Class Utils

extends Object
Class Inheritance

Utilities class for Brotli4j

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

The maximum compressed size.
maxCompressedSize
(int
The input size.
input_size
)

Returns the maximum compressed size for the given input size.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilsback to summary
private Utils()

Method Detail

maxCompressedSizeback to summary
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:int

The input size.

Returns:int

The maximum compressed size.

Exceptions
IllegalArgumentException:
If the input size is negative.