https://grokonez.com/java/compress-string-run-length-encoding-java
Compress String with Run Length Encoding in Java
In this Java example, we're gonna know how to compress String in Java with Run Length Encoding (RLE) method.
Related Posts:
- Java Regular Expression Overview – Syntax
- Java Regular Expression to extract data from a Text
- Java Regular Expression to mask information from a Text
Run Length Encoding
- RLE is a very simple form of data compression.
- It produces sequences in which the same data values occurs in data elements are stored as a single data value and a counter. For example, AAABB => 3A2B.
- RLE is suitable to use for:
- palette-based bitmap images such as computer icons or
- black points collection on a solid white background for example:
Implementation
Encoding is very simple. For decoding, we use Regular Expression - Regex.
More at:
https://grokonez.com/java/compress-string-run-length-encoding-java
Compress String with Run Length Encoding in Java
Top comments (0)