Compressing Pen Data

Data compression plays an important role in pen-based computing. The high sampling rates of a pen device, combined with large amounts of input, result in large blocks of ink data. The Pen API offers three methods of compression, each with advantages and disadvantages depending on the intended use of the ink data.

  • Removal of redundant or otherwise unwanted data from the data structure. This compression method does not result in loss of recognition accuracy if the compressed data is later recognized.

  • Reversible compression, also called "lossless" compression. Subsequently decompressing the data produces an HPENDATA object identical to the original. Since this compression method loses no information, the data can later be recognized with no loss of accuracy. However, the application cannot copy the compressed data to an HRC object; it must first uncompress the data before calling AddPenInputHRC.

  • Irreversible compression, sometimes called "lossy" compression. This method produces the highest degree of compression, but at the cost of lost information. Though the data is still perfectly suitable for display, it cannot be uncompressed and given to a recognizer without a significant loss of recognition accuracy. Irreversible compression is discussed later in the section "Converting Data to Display Resolution."

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples