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 '_'.

Functions

Link copied to clipboard
fun compress(in: ByteArray, len: Int, tmp: ByteArray, out: DataOutput): Boolean

Compress in[0:len] into out. This returns false if the content cannot be compressed. The number of bytes written is guaranteed to be less than len otherwise.

Link copied to clipboard
fun decompress(in: DataInput, out: ByteArray, len: Int)

Decompress data that has been compressed with .compress. len must be the original length, not the compressed length.