Package ovh.paulem.arcana.utils
Class ZLibUtils
java.lang.Object
ovh.paulem.arcana.utils.ZLibUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]compress(byte[] data) Compresses the input byte array using the ZLIB compression algorithm.static byte[]decompress(byte[] data) Decompresses a given byte array that was compressed using the ZLIB compression algorithm.
-
Constructor Details
-
ZLibUtils
public ZLibUtils()
-
-
Method Details
-
compress
Compresses the input byte array using the ZLIB compression algorithm.- Parameters:
data- the byte array to be compressed- Returns:
- a compressed byte array
- Throws:
IOException- if an I/O error occurs during compression
-
decompress
Decompresses a given byte array that was compressed using the ZLIB compression algorithm.- Parameters:
data- the compressed byte array to be decompressed- Returns:
- a decompressed byte array
- Throws:
IOException- if an I/O error occurs during decompression
-