Class ByteStringEncoding
java.lang.Object
com.github.yellowstonegames.core.ByteStringEncoding
A variant on LZSEncoding to encode byte arrays to compressed Strings, and decode them back. This always uses
UTF-16-safe encoding, which means it does not use one bit of each char in the compressed Strings but makes
sure the Strings are valid UTF-16 (so they can be written to and read from file more safely).
Like almost all of SquidSquad, this class is not thread-safe. It reuses internal data structures rather than repeatedly re-creating them, which strongly helps its single-threaded performance.
Like almost all of SquidSquad, this class is not thread-safe. It reuses internal data structures rather than repeatedly re-creating them, which strongly helps its single-threaded performance.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcompress(byte[] uncompressed) static byte[]decompress(String compressed)
-
Method Details
-
compress
-
decompress
-