Convert compression formats

About compression file formats

File compression is a process aimed at reducing file sizes by eliminating unnecessary data. This compression technique enables the creation of smaller file archives, simplifying the transfer and backup of large files or file collections. Additionally, compressed files facilitate faster and more convenient downloads while maximizing the storage capacity of removable media. Below, we are going to guide you on converting the most popular compression file formats using GroupDocs.Conversion.

Supported compression file conversions

FromTo
7ZCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
BZ2eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
CABCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
CPIOCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
GZeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
GZIPeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
LZeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
LZMAeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
RARCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
TARCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
XZeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
ZeBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT
ZIPCompression: 7Z, BZ2, CPIO, GZ, GZIP, LZ, TAR, XZ, Z, ZIP
eBook: AZW3, EPUB, MOBI
Image: BMP, DCM, DICOM, EMF, EMZ, GIF, ICO, JP2, JPEG, JPG, PNG, PSB, PSD, SVGZ, TGA, TIF, TIFF, WEBP, WMF, WMZ
Page Description Language: PCL, PS, SVG, TEX, XPS
PDF: PDF
Presentation: FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX
Spreadsheet: CSV, DIF, FODS, ODS, SXC, TSV, XLAM, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Web: HTM, HTML, MHT, MHTML
Word Processing: DOC, DOCM, DOCX, DOT, DOTM, DOTX, MD, ODT, OTT, RTF, TXT

Extract and convert from an archive

Using GroupDocs.Conversion, you can convert the archive content to your desired format.

To illustrate, here is a code sample showcasing how to convert the content of a ZIP archive to PDF format:

import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.options.convert.PdfConvertOptions;
import java.io.FileOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
...
try (Converter converter = new Converter("sample.zip")) {
            converter.convert(() -> new ByteArrayOutputStream(), (convertedStream, sourceFileName) -> {
                String outputFolder = "C:\\Output";
				Path path = Paths.get(outputFolder , sourceFileName + ".pdf");
                if (!path.getParent().toFile().exists())
                    Files.createDirectory(path.getParent());
                try (FileOutputStream fs = new FileOutputStream(path.toFile()); InputStream inputStream = convertedStream.toInputStream();) {
                    int read = 0;
                    byte[] buf = new byte[1024];
                    do {
                        read = inputStream.read(buf, 0, buf.length);
                        if (read > 0) {
                            fs.write(buf, 0, read);
                        }

                    } while (read > 0);
                }
                return null;
            }, (s, fileType) -> new PdfConvertOptions());
        }

With this code snippet, you can effortlessly convert the content of a ZIP archive to PDF format using GroupDocs.Conversion in Java. Enjoy the simplicity and flexibility of converting your archive content to meet your specific needs.

Note
Refer to the API reference for more conversion options and customizations.