Package cz.o2.proxima.core.util
Class StringCompressions
- java.lang.Object
-
- cz.o2.proxima.core.util.StringCompressions
-
public class StringCompressions extends java.lang.Object
Utilities related to string compression.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
gunzip(byte[] compressed, java.nio.charset.Charset encoding)
Un-gzip byte buffer to string.static byte[]
gzip(java.lang.String toCompress, java.nio.charset.Charset encoding)
Gzip compress a given string.
-
-
-
Method Detail
-
gzip
public static byte[] gzip(java.lang.String toCompress, java.nio.charset.Charset encoding)
Gzip compress a given string.- Parameters:
toCompress
- String to gzip.encoding
- Input string encoding.- Returns:
- Gzipped byte representation.
-
gunzip
public static java.lang.String gunzip(byte[] compressed, java.nio.charset.Charset encoding)
Un-gzip byte buffer to string.- Parameters:
compressed
- Compressed buffer.encoding
- Output string encoding.- Returns:
- String.
-
-