Package com.iizix.term.remote
Class ScreenCompression
java.lang.Object
com.iizix.term.remote.ScreenCompression
A simple screen compression using RLE algorithm.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- byte[]- packBytes- (byte[] in, int start, int length) Function to pack an array of bytes with RLE sentinel bytes 0xFD (8-bit) and 0xFF (16-bit), 0xFE [byte] if the [byte] is 0xFD, 0xFE or 0xFF.- char[]- packChars- (char[] in, int start, int length) Function to pack an array of characters with RLE sentinel bytes 0x7F (8-bit) and 0xFF (16-bit), 0xFE [char] if the [char] is 0x7F, 0xFE or 0xFF.- byte[]- unpackBytes- (byte[] in) Function to unpack an array of bytes with RLE sentinel bytes 0xFE (8-bit) and 0xFF (16-bit), 0xFD [byte] if the [byte] is 0xFD, 0xFE or 0xFF.- char[]- unpackChars- (char[] in) Function to unpack an array of characters with RLE sentinel bytes 0x7F (8-bit) and 0xFF (16-bit), 0xFE [char] if the [char] is 0x7F, 0xFF or 0xFE.
- Constructor Details- ScreenCompressionpublic ScreenCompression()
 
- Method Details- packCharspublic char[] packChars- (char[] in, int start, int length) Function to pack an array of characters with RLE sentinel bytes 0x7F (8-bit) and 0xFF (16-bit), 0xFE [char] if the [char] is 0x7F, 0xFE or 0xFF.- Parameters:
- in- The input array.
- start- The starting position.
- length- The length of the data.
- Returns:
- The output array, RLE packed.
 
- unpackCharspublic char[] unpackChars- (char[] in) Function to unpack an array of characters with RLE sentinel bytes 0x7F (8-bit) and 0xFF (16-bit), 0xFE [char] if the [char] is 0x7F, 0xFF or 0xFE.- Parameters:
- in- The input array.
- Returns:
- The output array, RLE packed.
 
- packBytespublic byte[] packBytes- (byte[] in, int start, int length) Function to pack an array of bytes with RLE sentinel bytes 0xFD (8-bit) and 0xFF (16-bit), 0xFE [byte] if the [byte] is 0xFD, 0xFE or 0xFF.- Parameters:
- in- The input array.
- start- The starting position.
- length- The length of the data.
- Returns:
- The output array, RLE packed.
 
- unpackBytespublic byte[] unpackBytes- (byte[] in) Function to unpack an array of bytes with RLE sentinel bytes 0xFE (8-bit) and 0xFF (16-bit), 0xFD [byte] if the [byte] is 0xFD, 0xFE or 0xFF.- Parameters:
- in- The input array.
- Returns:
- The output array, RLE packed.