Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ faxG4(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_cis_create(3)

xil_cis_get_attribute(3)

xil_cis_get_bits_ptr(3)

xil_compress(3)

xil_decompress(3)

xil_cis_put_bits(3)

xil_cis_put_bits_ptr(3)

faxG3(3)

NAME

faxG3, faxG4 − CCITT Group 3 and Group 4 compressors for compressed image sequences

DESCRIPTION

The XIL library provides compressors that conform to the specifications developed by the Consultative Committee of International Telegraph and Telephone (CCITT) for Group 3 and Group 4 facsimile devices.  These standards are supported in the XIL library as defined in recommendations T.4 and T.6 of Fascicle VII.3 (blue book) with the following exceptions: 2-dimensional coding and decoding for Group 3 devices is not currently supported, and no optional extension modes for group 4 coding and decoding are supported.  Support for these modes may occur in future releases. 

These compression techniques, originally formulated for facsimile devices, are now heavily used by makers of general document storage and retrieval systems.  The XIL library’s CCITT Group 3 compressor (faxG3) uses a run-length encoding technique; the Group 4 (faxG4) compressor relies almost entirely on a two-dimensional technique.  On standard text, the XIL library’s Group 3 compressor achieves a compression ratio of about 5:1, while the Group 4 compressor achieves a ratio of about 10:1.  For more information on these compressors, consult the XIL Programmer’s Guide. 

Creating a CIS

To compress a compressed image sequence (CIS) with an XIL fax compressor, specify either "faxG3" or "faxG4" for the compressorname argument in xil_cis_create(3). 

Getting and Setting Fax Attributes

Although other compression standards encode size information (the image width, height, and number of bands) within the bitstream, the fax standards do not.  Thus, if you put compressed data into your CIS using xil_cis_put_bits(3) or xil_cis_put_bits_ptr(3) you must set the decompressor attributes for width, height, and number of bands; otherwise a call to xil_decompress(3) generates an error.  Use xil_cis_get_attribute(3) and xil_cis_set_attribute(3) to get and set the fax decompression attributes. 

Fax Decompression Attributes

The following paragraphs describe the faxG3 and faxG4 CIS attributes available with the XIL library. All structures and enumerations are defined in xil.h.  These attributes are "set-only," as indicated under the Access heading for each attribute. 

To set an attribute that is a structure, you must pass that structure’s address.  To get an attribute, you always pass its address. 

WIDTH

Description defines width of image for fax decompressor

Access set-only

Type short

Values 0 - 32767

Default 0

Notes Set the value of this attribute to the width in pixels of the images to be decompressed.  If you do not set it, its value is 0 and an error occurs when you call xil_decompress(3), as discussed above in "Getting and Setting Fax Attributes."

HEIGHT

Description defines height of image for fax decompressor

Access set-only

Type short

Values 0 - 32767

Default 0

Notes Set the value of this attribute to the height in pixels of the images to be decompressed.  If you do not set it, its value is 0 and an error occurs when you call xil_decompress(3), as discussed above in "Getting and Setting Fax Attributes."

BANDS

Description defines number of bands in image for fax decompressor

Access set-only

Type short

Values 0 - 32767

Default 0

Notes Set the value of this attribute to the number of bands in the images to be decompressed.  If you do not set it, its value is 0 and an error occurs when you call xil_decompress(3), as discussed above in "Getting and Setting Fax Attributes."

EXAMPLES

The following example opens and closes a faxG3 CIS using the XIL library:

XilSystemState State;
XilCis cis;
State = xil_open();
cis = xil_cis_create(State, "faxG3");
 -- calls to faxG3-specific compression routines --
 xil_cis_destroy(cis);
xil_close(State);

NOTES

The xil_cis_set_attribute () and xil_cis_get_attribute () calls are used to modify the default behavior of a specific compressor.  Generic attributes of compressors are set by individual function calls.

SEE ALSO

xil_cis_create(3), xil_cis_get_attribute(3), xil_cis_get_bits_ptr(3), xil_compress(3), xil_decompress(3), xil_cis_put_bits(3), xil_cis_put_bits_ptr(3). 

SunOS 5.6  —  Last change: 08 June 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026