Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

What is CCITT compression?

1 min read

CCITT is a lossless compression format used to compress 2 color images (usually black and white). It is used for TIFF compression.

What does CCITT stand for?

The initials CCITT comes from Comité Consultatif International Téléphonique et Télégraphique which was created in 1956. This international group (which is part of the even older International Telecommunication Union) defined the standards.

How does CCITT compress data?

There are actually several different versions of CCITT compression, generally known as Group 3 and Group 4. Group 3 encodes each line individually whereas Group 4 references the previous lines.

CCITT Uses a technique called Huffman encoding, which allows the data to be squeezed into a much smaller compressed stream. It creates a dictionary of variable length keys, assigning the shortest keys to the most common data patterns. It works best on images which contain long repeating pixels of a single colour. We have a more detailed post on How does CCITT compress image data?

How do I use CCITT?

A big initial use for CCITT was reducing the size of images send by fax machines (do you know anyone who still uses a fax machine?). These days, it is used in Tiff images and PDF Documents to reduce file size without any loss of image quality.

CCITT is generally used as part of something else (fax machine, TIFF reader, PDF library) so there is generally not much ‘standalone’ CCITT software. But there is good support for in most TIFF and PDF libraries. If you do have raw CCITT data, you can convert it into a TIFF image file by adding some additional data to it.

If you do need the option to compress or decompress CCITT, this is a feature in our JDeli Image library.



Are you a Java Developer working with Image files?

// Read an image
BufferedImage bufferedImage = JDeli.read(dicomImageFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(heicImageFile);

// Write an image
JDeli.write(bufferedImage, "heic", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(jpegImageFile);

// Write an image
JDeli.write(bufferedImage, "jpeg", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(jpeg2000ImageFile);

// Write an image
JDeli.write(bufferedImage, "jpx", outputStreamOrFile);
// Write an image
JDeli.write(bufferedImage, "pdf", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(pngImageFile);

// Write an image
JDeli.write(bufferedImage, "png", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(tiffImageFile);

// Write an image
JDeli.write(bufferedImage, "tiff", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(webpImageFile);

// Write an image
JDeli.write(bufferedImage, "webp", outputStreamOrFile);
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

What is JBIG2?

JBIG2 is a lossless and lossy compression standard for bi-level images like scanned documents, offering high compression ratios by identifying and encoding similar shapes...
chika
47 sec read