Package org.apache.lucene.util.compress
Class LowercaseAsciiCompression
java.lang.Object
org.apache.lucene.util.compress.LowercaseAsciiCompression
Utility class that can efficiently compress arrays that mostly contain characters in the
[0x1F,0x3F) or [0x5F,0x7F) ranges, which notably include all digits, lowercase characters, '.',
'-' and '_'.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
compress
(byte[] in, int len, byte[] tmp, DataOutput out) Compressin[0:len]
intoout
.static void
decompress
(DataInput in, byte[] out, int len) Decompress data that has been compressed withcompress(byte[], int, byte[], DataOutput)
.
-
Method Details
-
compress
Compressin[0:len]
intoout
. This returnsfalse
if the content cannot be compressed. The number of bytes written is guaranteed to be less thanlen
otherwise.- Throws:
IOException
-
decompress
Decompress data that has been compressed withcompress(byte[], int, byte[], DataOutput)
.len
must be the original length, not the compressed length.- Throws:
IOException
-