XeroxCompress.mesa
Copyright (C) Xerox Corporation 1985, 1986. All rights reserved.
last edited by castillo 18-Jun-85 17:59:47
Tim Diebert: December 1, 1986 9:47:16 am PST
XeroxCompress: CEDAR DEFINITIONS = BEGIN
This module defines the interface to the Xerox compression routines.
Intialize must be called first with the heap to be used to store internal data.
CompressPlate is called to perform the compression. The parameter, "scanLineProc" is used by the compressor to get the scan lines. "putBitsProc" is used to output the compressed pixels to the output.
=========
CONSTANTS
=========
wrdsInScanLine: CARDINAL = 256;
dWrdsInScanLine: CARDINAL = wrdsInScanLine / 2;
=====
TYPES
=====
BitWrdIndex: TYPE = [0..wrdsInScanLine);
ScanLine: TYPE = ARRAY [0..wrdsInScanLine) OF CARDINAL;
ScanLinePtr: TYPE = REF ScanLine;
DWScanLine: TYPE = ARRAY [0..dWrdsInScanLine) OF LONG CARDINAL;
DWScanLinePtr: TYPE = REF DWScanLine;
PutBitsProc: TYPE = PROCEDURE [val: CARDINAL, bits: INTEGER];
ScanLineProc: TYPE = PROCEDURE RETURNS [
current: ScanLinePtr ← NIL, previous: ScanLinePtr ← NIL];
=========
PROCEDURE
=========
CompressPlate: PROCEDURE [
scanLen: CARDINAL, scanLineProc: ScanLineProc, putBitsProc: PutBitsProc]
RETURNS [xPixels: CARDINAL, byteSize: LONG CARDINAL];
Initialize: PROCEDURE [];
END...
LOG
13Sep84 - Okamoto - Created.
18Jun85 - castillo - copyright notice.