1COMPFACE(3) Library Functions Manual COMPFACE(3)
2
3
4
6 compface, uncompface - compress and expand 48x48x1 face image files
7
9 compface (buf)
10
11 uncompface (buf)
12
13 char *buf
14
16 compface is a function for generating highly compressed representations
17 of 48x48x1 face image files. uncompface is an inverse function which
18 performs an inverse transformation with no loss of data. The algorithm
19 used is highly tuned for its purpose and achieves better than a five to
20 one compression ratio on average. In both functions, input is via a
21 NULL terminated string and a NULL terminated output string is written
22 over the input string. Buf should therefore point to a block of 2K
23 size or more to avoid buffer overruns during output generation.
24
25 The input format for compface (and the output format for uncompface) is
26 48 lines each of 3 sixteen bit hexadecimal integers, comma terminated
27 in C initialiser style. The output format of compface (and the input
28 format for uncompface) is some number of lines made up of a space fol‐
29 lowed by printable characters (in the range ``!'' to ``~'' inclusive).
30 The first line contains 72 characters and following lines contain 79
31 characters except that the last line may be short.
32
33 This version of compface has been patched to also be able to handle
34 normal XBM images. uncompface will produce XBM output only if the -X
35 switch is applied.
36
37 The amount of compression obtained varies between face image files but
38 the output of compface averages less than 200 characters. The average
39 number of output lines is three.
40
42 The return value is normally 0. 1 will be returned if extra input has
43 been ignored during a compress operation. -1 is returned in the case
44 of an invalid input format. -2 is returned if an internal buffer over‐
45 run occurs.
46
48 Compface(1)
49
50
51
52 25 January 1990 COMPFACE(3)