Sharing the essence: using open-source code to write Linux programs

Source: Internet
Author: User
Tags zipinfo
Sharing the essence: use open-source code to write Linux programs-general Linux technology-Linux programming and kernel information. The following is a detailed description. Collation

Programming in linux doesn't have to be written on its own. However, many open-source files can be reused on the Internet. This article is only for conversion, and we also want to share with each other how to effectively use these resources, never be stingy with your experience.

Origin

When I was a child, I liked cartoon cartoons. I recently accidentally saw many cartoons I 've seen on the Internet, such as donwloading ..., however, these cartoons are all placed in a zip package, and it seems inconvenient to decompress them. win has some software that looks at the image directly in the zip package and is easy to use, but in linux, there are very few and even x is needed. It is usually inconvenient for people like me who work directly in the console without x. Therefore, I want to write a small tool to solve this problem.

Problem

In the initial stage, the tool needs to solve the problems of zip decompression, image decoding, and graphic display, which are irrelevant to the code-level platform.

There are two solutions for zip decompression:

1. Use the unzip tool (zipinfo and unzip) to complete

2. Use zlib and its packaging library zziplib

The image-related SDL_image library is used for SDL and related image decoding.

Unzip usage
CODE: # define UNZIP "unzip-p-qq-P"
# Define UNZIP_TEST "unzip-q-t-P"
# Define ZIPINFO "zipinfo-1"
# Define SORT "sort-gin"
Related Article

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.