Package ai.platon.pulsar.common
Class DeflateUtils
-
- All Implemented Interfaces:
public class DeflateUtilsA collection of utility methods for working on deflated data.
vincent
-
-
Constructor Summary
Constructors Constructor Description DeflateUtils()
-
Method Summary
Modifier and Type Method Description final static Array<byte>inflateBestEffort(Array<byte> in)Returns an inflated copy of the input array. final static Array<byte>inflateBestEffort(Array<byte> in, int sizeLimit)Returns an inflated copy of the input array, truncated to sizeLimitbytes, if necessary.final static Array<byte>inflate(Array<byte> in)Returns an inflated copy of the input array. final static Array<byte>deflate(Array<byte> in)Returns a deflated copy of the input array. -
-
Method Detail
-
inflateBestEffort
final static Array<byte> inflateBestEffort(Array<byte> in)
Returns an inflated copy of the input array. If the deflated input has been truncated or corrupted, a best-effort attempt is made to inflate as much as possible. If no data can be extracted
nullis returned.- Parameters:
in- an array of objects.- Returns:
an array of objects.
-
inflateBestEffort
final static Array<byte> inflateBestEffort(Array<byte> in, int sizeLimit)
Returns an inflated copy of the input array, truncated to
sizeLimitbytes, if necessary. If the deflated input has been truncated or corrupted, a best-effort attempt is made to inflate as much as possible. If no data can be extractednullis returned.- Parameters:
in- an array of objects.sizeLimit- a int.- Returns:
an array of objects.
-
inflate
final static Array<byte> inflate(Array<byte> in)
Returns an inflated copy of the input array.
- Parameters:
in- an array of objects.- Returns:
an array of objects.
-
-
-
-