This document is README.ko.md file translated with Google Translator.
This document describes the compression method used by the first generation DisplayLink devices to transmit compressed data.
The compression method uses a type of Huffman encoding as analyzed by the Tubecable developer, but it does not designate a code for every value. Instead, it has an accumulator that stores value. As the tree is traversed based on the input, the value assigned to the node is added to the accumulator, and if the next row is 0, it is considered the end and the value stored in the accumulator so far is used.
A node of the decompression table consists of a total of 9 bytes. It consists of the following fields:
A node can be further decomposed into two elements.
Element | Color | UnkByte | UnkBool | NextNode |
---|---|---|---|---|
A | ShortA | Byte1A | bool(Byte2A & 0x60) | (Byte2A & 0x1f) << 4 |
B | ShortB | Byte1B | bool(Byte2B & 0x60) | (Byte2B & 0x1f) << 4 |
The fields in each element have the following roles:
- Color: The color to add to the color accumulator.
- UnkByte: Not yet figured out.
- UnkBool: Not yet figured out.
- NextNode: The number of the node to move to.
A Python module for manipulating the decompression table transmitted to the device.
./decomptable_util.py decomptable.bin
Prints the graph (in DOT language format) of the decompression table to standard output.
./generate_graph.py decomptable.bin > graph.dot
Example: Generated graph of decompression table from Tubecable
Generates compressed color values that are transmitted to the device.
./lutgenerator.py decomptable.bin