DIRECTORY Environment USING [Block]; XeroxDecompress: CEDAR DEFINITIONS = BEGIN DecompressFlavor: TYPE = {-- the first 3 direct from the RES standard adaptive, ccitt, compressed, -- formerly IMG huffman, read}; DecompressInfo: TYPE = RECORD [ scanLength: NATURAL, -- number of pixels (in this case, bits) in scanline flavor: DecompressFlavor, private: REF]; -- to impl's private data DecompressHandle: TYPE = REF DecompressInfo; Error: ERROR [line: CARDINAL]; InitProc: TYPE = PROCEDURE [v: Environment.Block] RETURNS [h: DecompressHandle]; DoneProc: TYPE = PROCEDURE [h: DecompressHandle]; NextLineProc: TYPE = PROCEDURE [h: DecompressHandle, out: LONG POINTER] RETURNS [valid: BOOLEAN]; AdaptiveInit: InitProc; AdaptiveNextLine: NextLineProc; AdaptiveDone: DoneProc; CcittInit: InitProc; CcittNextLine: NextLineProc; CcittDone: DoneProc; CompressedInit: InitProc; CompressedNextLine: NextLineProc; CompressedDone: DoneProc; HuffmanInit: InitProc; HuffmanNextLine: NextLineProc; HuffmanDone: DoneProc; ReadInit: InitProc; ReadNextLine: NextLineProc; ReadDone: DoneProc; END. ²XeroxDecompress.mesa Copyright c 1984, 1986 by Xerox Corporation. All rights reserved. last edited by: castillo 20-Dec-84 15:46:12 Defines Procedure types that can be used for decompression in cases where maxSampleValue = 1 and the result is a series of scanlines of [0..1] bits in contiguous memory, padded with 0's to the next doubleword there will be a separate implementation for each flavor of compression Decompression occurs at the time the samples vector is needed i.e. MakeSampledBlack or MaskPixel those below non-standard and 'modified' error while decompressing. The decompressor should free up the resources allocated before raising this error. v points to the data bytes in a sequenceLargeVector where bytesInInt = 2 and the vector may have been of a one of the compressed flavors caller assures "out" points to space enough for one scanline valid = TRUE up through last scan line LOG 5Nov84 - castillo. Newlin 5-Nov-84 modify flavor names, add RETURNS to NextLine & add specific PROCS. 16Nov84 - castillo - changed Init parms, added Error. 20Dec84 - castillo - changed the LONG POINTER in Init for a Env.BLock. Rick Beach, June 17, 1986 12:01:57 pm PDT Converted to Cedar Κ„˜codešœ™Kšœ Οmœ7™BKšœ-™-—K˜K˜KšœC™CKšœC™CKšœI™IKšœF™FKšœ=™=Kšœ"™"K˜šΟk ˜ Kšœ žœ ˜K˜—KšΟnœž˜"Kšœž˜˜šœžœΟc+˜EKšœ ˜ Kšœ˜Kšœ  ˜Kšœ'™'K˜K˜—K˜šœžœžœ˜Kšœ žœ 4˜NK˜Kšœ žœ ˜*—K˜Kšœžœžœ˜,K˜K˜šŸœžœžœ˜Kšœ:™:Kšœ2™2—K˜K˜šœ žœž œžœ˜PKšœH™HKšœ?™?—K˜Kšœ žœž œ˜1K˜š œžœž œžœžœžœ žœ˜aKšœ<™