## Printer Device Driver

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

### GplCompressRLLDeltaRow

Description

This function performs RLL delta-row encoding. It compresses a string of bytes and returns the compressed string at pbReturn and the new string usLength as its return value. This method replaces only bytes in the current row that are different from the proceeding seed row. Unlike GplCompressDeltaRow, however, the replacement or delta bytes themselves are encoded.

Format

    INT APIENTRY GplCompressRLLDeltaRow(

                          INT      usTotalBytes,   // Bytes in the scan line

                          PBYTE    pbData,         // Input raster data to compress

                          PBYTE    pbLastLine,     // Previous scanline's raster data

                          INT      usMaxReturn,    // Length of output buffer

                          PBYTE    pbReturn,       // Output buffer with compressed data

                          PUSHORT  pDeltas );      // Differences indexes-start/end pairs

Parameters

usTotalBytes (INT) Count of bytes pointed to by pbData and pbLastLine.

pbData (PBYTE) Pointer to bytes of data to compress.

pbLastLine (PBYTE) Pointer to previous uncompressed data.

usMaxReturn (INT) Size of output buffer.

pbReturn (PBYTE) Pointer to compressed data will be written.

pDeltas (PUSHORT) Differences indexes = array of start and end pairs.

Returns

0 Current and previous line are identical.

>0 Length of data pointed to by pbReturn.

-1 GPLCOMPRESS_ERROR
usMaxOutput not large enough for the compressed output.