The T.4 image compression and decompression routines implement the 1D and 2D encoding methods defined in ITU specification T.4. They also implement the pure 2D encoding method defined in T.6. These are image compression algorithms used for FAX transmission.