Decompress svgz to SVG

Source: Internet
Author: User
At hand ProgramTo extract svgz to SVG.

Previously, I used WinRAR for manual decompression, So I thought svgz was in the ZIP format (because it is basically the same as the zip compression ratio). Now I know that it is in the gzip compression format.

Before solving this problem, I had to look for vclzip, ziptv, 7zip, and other related components. I did not expect it to be so easy:

The tcompressionstream and tdecompressionstream classes in the idzlib unit can be used,
This unit also provides easy-to-use compressstream (), compressstring (), decompressstream (), and other functions.
During compression, you can select the compression type (zlib, Gzip, etc.) and compression ratio, which are easy to use.

You can also use the tidcompressorzlib class in the idcompressorzlib unit.

According to its usage (such as web page compression), Gzip should be a very suitable format for text compression. Different from the tools provided by zlib, Gzip is: gzip can be decompressed by common compression tools.
With this, I may not consider using other compression tools in the program in the future.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.