COMPFACE(3)
π COMPFACE β the manual, bestie edition β¨
okay so this is the page for compface and uncompface β two lil library functions that squish and un-squish 48x48x1 face image files. yes, literally faces. we're doing face compression. iconic behavior honestly π«Ά
πΈ NAME πΈ
compface, uncompface β compress and expand 48x48x1</> face image files π
β¨ SYNOPSIS β¨
compface (buf)
uncompface (buf)
char *buf
no cap, that's the whole thing. two functions, one char *buf, that's the vibe π
π DESCRIPTION π
so compface is the function that generates highly compressed representations of 48x48x1 face image files. and uncompface is its inverse function β it does the inverse transformation with no loss of data. zero. none. the data comes back exactly how it left, periodt π―
the algorithm is highly tuned for this specific purpose and it achieves better than a five to one compression ratio on average. she's efficient, she's focused, she ate π₯
in both functions: input comes in via a NULL terminated string, and a NULL terminated output string gets written over the input string. so heads up bestie β
buf should point to a block of 2K size or more to avoid buffer overruns during output generation. like, actually. don't skimp on the buffer. the output writes on top of the input and she needs room π¨
π¦ the formats π¦
the input format for compface (and the output format for uncompface) is:
48lines- each of
3sixteen bit hexadecimal integers - comma terminated
- in C initialiser style
the output format of compface (and the input format for uncompface) is:
- some number of lines
- made up of a space followed by printable characters
- those characters are in the range
!'' to~'' inclusive - the first line contains
72characters - following lines contain
79characters - except the last line may be short
π the XBM glow-up π
this version of compface has been patched to also be able to handle normal XBM images. and uncompface will produce XBM output only if the -X switch is applied. no -X, no XBM. that's the rule π
π how much does it actually shrink π
the amount of compression obtained varies between face image files β it's not one fixed number, okay β but the output of compface averages less than 200 characters. and the average number of output lines is three. three lines. for a whole face. we love a compact queen π
π DIAGNOSTICS π
the return value is normally 0. here's the whole mood ring:
0β normal, we're chilling, everything slayed β¨1β returned if extra input has been ignored during a compress operation. she noticed, she just didn't say anything π-1β returned in the case of an invalid input format π¨-2β returned if an internal buffer overrun occurs π
bestie. if you get -2, something went very wrong internally. check your buffer size. i'm just saying. π«Ά
π SEE ALSO π
and that's the whole page!! this version of the compface manual is dated 25 January 1990 and lives in the Library Functions Manual section as COMPFACE(3) β old money, still relevant, we stan a legacy icon π
stay compressed, stay lossless, and please give buf at least 2K πβ¨π¦
π¦ where this page comes from
- debian bookworm: libcompfaceg1-dev 1:1.5.2-5.1
- debian trixie: libcompfaceg1-dev 1:1.5.2-6.1
- fedora 43: compface-devel 1.5.2-43.fc43 Β· LicenseRef-compface
- fedora 43: compface-devel 1.5.2-43.fc43 Β· LicenseRef-compface
- fedora 44: compface-devel 1.5.2-45.fc44 Β· LicenseRef-compface
- fedora 44: compface-devel 1.5.2-45.fc44 Β· LicenseRef-compface
- opensuse-leap 16.0: compface 1.5.2-bp160.1.13 Β· MIT
- opensuse-leap 16.0: compface 1.5.2-bp160.1.13 Β· MIT
- opensuse-leap 16.0: compface 1.5.2-bp160.1.13 Β· MIT
- opensuse-leap 16.0: compface 1.5.2-bp160.1.13 Β· MIT
- ubuntu jammy: libcompfaceg1-dev 1:1.5.2-5.1
- ubuntu noble: libcompfaceg1-dev 1:1.5.2-5.1
- ubuntu questing: libcompfaceg1-dev 1:1.5.2-6.1
- ubuntu resolute: libcompfaceg1-dev 1:1.5.2-6.1build1
- ubuntu stonking: libcompfaceg1-dev 1:1.5.2-6.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms