I just created a demo to decompress the local zip file and use webview to display one of the html files and directly upload the code. If you need it, you can check it out.
Public class ZipActivity extends Activity {
Private static final String TAG = "HelloXmlActivity ";
Private WebView mWebView;
Private static LinkedHashMap
// Http://blog.csdn.net/com360/article/details/6618086
/** Called when the activity is first created .*/
@ Override
Public vo
An example of using Python to read, write, and decompress files,
Read/write filesFirst, let's look at an example:
F = open('thefile.txt ', 'w') # Open in write mode. try: f. write ('wokao') finally: f. close ()
File opening method:
F = open ('file', 'Mode') 'r': Read-Only (default. If the file does not exist, an error is thrown.) 'W': Write-only (if the file does not exist, the file is automatically created). At this time, f. read () method, and when
fileIn the introduction of the jar file has been said that the jar file is actually a zip file, so you can use some of the common unzip the zip file tool to extract JAR files, such as WinZip under Windows, WinRAR, and Linux under the unzip and so on. Using WINZIP and WinRAR to decompress is because they are more intuitive and convenient decompression. With unzip, you can use the-d parameter to specify the target directory when extracting it.When extr
Memorandum-compress integers and decompress them
Original: Anders Liu
This article is outdated. See compressed integers used in. NET/CLI metadata: http://www.cnblogs.com/andresliu/archive/2010/02/09/compressed-integer-in-metadata.html.
Abstract :. NET/cli pe files widely use an integer compression algorithm, which can put a 32-bit unsigned integer in 1, 2 or 4 bytes according to its size. This article introduces this compression algorithm and provides
In. NET 2.0, you can use sharpziplib, an open source DLL, to easily decompress ZIP files and GZ files.
You can download sharpziplib here.
The following describes the specific code:
1. Unzip the ZIP file:
Namespace: icsharpcode. sharpziplib. Zip
Private Static void uncompresszip (string file, string DIR)
Where:
File indicates the path and file name of the ZIP file.
Dir indicates the decompressed path.
2. Decompr
This article describes how to compress/decompress files with the Czip/cunzip class, which uses the gzip GNU Source Code (GZIP-1.2.4A). This is a free software that can be distributed and modified under the Gun general Public License (License) terms and conditions for the general Public License, please refer to:
Http://www.vckbase.com/vckbase/uniondocs/gungpl.htm
Target Dynamic Library output two classes:
Czip (for compressed files)
Cunzip (for ext
This article describes how to use zlib to compress and decompress strings in python. It also describes the usage of zlib and how to use zlib. compressobj and zlib. decompressobj is used to compress and decompress files. For more information about how to compress and decompress strings using zlib, see the following example. Share it with you for your reference. Th
In Linux, decompress the tar. xz format file and compress the new laptop system a few days ago. You want to re-compile the kernel ...... Dumb's head is that tar-xvjf linux-*** cannot be used to decompress the package. After a close look, we found that the kernel package downloaded on the official kernel website is not bz2 !!! Instead, tar. xz ...... What the fuck! Amount ...... When can I change the format!
Add the ZIP file to the program funding source file and decompress the file at run time.
Today, I am doing research on the installation package program. My colleagues previously published a lot of scattered files into an installation folder for users. This is a poor experience. I hope to package all the files into one..
Solution Process:
1. Use the WinRAR tool to package all scattered files into a ZIP file, such as SetupRes.zip.
2. Create a console or
The first step for beginners is to know how to compress and decompress files in linux-general Linux technology-Linux technology and application information. For more information, see the following. What is the secret file? How should I use it? I believe you will understand this article.
As a newbie, the first step to learn about linux is to install the application software on the platform. However, the software downloaded to the Internet ends with .t
=newbytearrayoutputstream ();while ((Len=is.read (b)) >-1) { System.out.println (len);//The length of each read is not always 10kos.write (B,0,len);} Con.disconnect ();/*2, decompression, can be extracted directly from the URL connection of the input stream decompression Zipinputstream (Con.getinputstream ()) */zipinputstreamzis= newzipinputstream (Newbytearrayinputstream (OS. Tobytearray ())); Zipentryze=zis.getnextentry (); System.out.println ("File name:" +ze.getname ()); Bytearrayoutputstrea
expanding or extracting files. In the following example, msgame is extracted from the driver cab file on the installation CD. sys File and copy it to C: \ WINDOWS \ SYSTEM \ drivers: Expand D: \ i386 \ driver. cab \ f: msgame. in the Sys C: \ WINDOWS \ SYSTEM \ drivers example, the compressed file access is expanded. CP _: Expand D: \ i386 \ acces. cp_c: \ windows \ system32 \ access. in the CPL example, all files in the driver cab file on the installation CD are listed. Expand/d: \ i386 \ driv
From: http://www.cnjm.net/tech/article4729.html
The super short and concise zip decompression class has only 280 lines of Java code. After obfuscation and compression, the class file is only about 4 K, which is especially suitable for the development of j2s.
The decompression algorithm comes from the famous gzip. Java on the Internet. I only added the Section for parsing the ZIP file format.
List () method:List all files and directories in the zip package, including the full name of the path, fo
Because of work, we need to decompress system. check the IMG file to see if there are any tools I have added. There is no way to check the information on the Internet. Later, I found the tool and tested it. However, there are many points worth attention between them. Write down and take a note;
1) You need a tool "simg2img", this tool if you download the 4.0 source code, after compilation is completed in the out/host/linux-x86/bin directory; with whic
Decompress the tar.tar file:First, run the file command to view the file type (which may be bz2 or GZ). Command Format: file filename.tar.tarTake mplayer-0.91.tar.tar as an example:[Root @ localhost ~] # File MPlayer-0.91.tar.tarMPlayer-0.91.tar.tar: Bzip2 compressed data, block size = 900 K
It is known from Bzip2 compressed data that this file is bz2 and must be decompressed with bunzip2.Command Format: bunzip2 filename.tar.tar
Take mplayer-0.91.ta
Compress the n-base array into a string (0-9 a-z) and decompress it.
There are two points to define such a question:
1. Create a table: index the character with an array subscript. Note that if the character is returned to a number:
Int index = (str [I]> = '0' str [I]
2. Pay attention to whether the low position is in front of the high position. If the first position isLow * radix ^ IYou can.
3. Calculate the number of radix hexadecimal arrays in on
How to decompress files in Ubuntu
Record various compression and decompression methods in Ubuntu:
. TarUnpack: tar xvf FileName.tarPackage: tar cvf FileName.tar DirName(Note: tar is packed, not compressed !)---------------. GzDecompress 1: gunzip FileName.gzDecompress 2: gzip-d FileName.gzCompression: gzip FileName.Tar.gzDecompress: tar zxvf FileName.tar.gzCompression: tar zcvf FileName.tar.gz DirName---------------. Bz2Decompress 1: bzip2-d FileName.
-encoding: gzip, deflate
Decompress gzip:
UseCodeThe following function uses the get method to obtain the data on the network, and then uses the gzipinputstream class to understand the pressure on the gzip data. And returns the resulting string:
Public String get (string URL) {httpget get = new httpget (URL); httpclient client = new defaulthttpclient (); get. addheader ("Accept-encoding", "gzip, deflate"); // Add the GZIP format httprespons
Decompress RAR compressed files in Linux
Operating System: centos 5.4 final
Software: rarlinux-3.9.3.tar.gz
Installation steps:
Download RAR 3.93 for Linux from http://www.rarsoft.com/download.htm,Is http://www.rarsoft.com/rar_CN/rarlinux-3.9.3.tar.gz
[Root @ centos opt] # tar zxvf rarlinux-3.9.1.tar.gzRAR/RAR/readme.txtRAR/Default. SFXRAR/whatsnew.txtRAR/license.txtRAR/order.htmRAR/RARRAR/unrarRAR/rar_staticRAR/tete.txtRAR/rarfiles. lstRAR/makef
I'm glad to have successfully applied for a blog in the blog Park. I 'd like to express my gratitude for writing an article.Today, I made a project for someone else. There are not many functions, but some functions are complicated. For example, use a web page to compress and decompress files. After multiple searches, sharpziplib is used to implement the compression function.The Code is as follows:Using system;Using system. IO;Using icsharpcode. sharpz
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.