## Printer Device Driver

[prev][next][parent][TOC]

### GplCompressRLL

Description

This function performs run-length limited (RLL) encoding.

Format

    LONG APIENTRY GplCompressRLL(

                         PBYTE  pbDataIn,      // Input raster data to compress (page/band)

                         LONG   cbDataIn,      // Length of input data buffer (pbDataIn)

                         PBYTE  pbDataOut,     // Output buffer to which compressed data is written

                         LONG   cbDataOut );   // Length count of compressed data written

Parameters

pbDataIn (PBYTE) Pointer to input data.

cbDataIn (LONG) Count of bytes in, pointed to by pbData.

pbDataOut (PBYTE) Pointer to output data.

cbDataOut (LONG) Size of buffer in bytes pointed to by pbDataOut.

Returns

Signed LONG, which is the length in bytes of the compressed data pointed to by cbDataOut.

Success Number of bytes in compressed return string.

Failure GPLCOMPRESS_ERROR (-1)
The output buffer length has been exceeded.

Notes

The input data is encoded with pairs of bytes. The first byte is the replacement count and the second byte is the data. A replacement count of 0 means that the data is not repeated.