Compression
The Java I/O library contains classes to support reading and writing streams in a
These classes are not derived from the Reader and Writer classes, but instead are part of the InputStream and OutputStream hierarchies. This is because the compression library works with bytes, not characters. However, you might sometimes be forced to mix the two types of streams. (Remember that you can use InputStreamReader and OutputStreamWriter to provide easy conversion between one type and another.)
Function | |
---|---|
CheckedInputStream |
GetCheckSum( ) produces checksum for any InputStream (not just decompression). |
CheckedOutputStream |
GetCheckSum( ) produces checksum for any OutputStream (not just compression). |
DeflaterOutputStream |
Base class for compression classes. |
ZipOutputStream |
A DeflaterOutputStream that |
GZIPOutputStream |
A DeflaterOutputStream that compresses data into the GZIP file format. |
InflaterInputStream |
Base class for decompression classes. |
ZipInputStream |
An InflaterInputStream that decompresses data that has been stored in the Zip file format. |
GZIPInputStream |
An InflaterInputStream that decompresses data that has been stored in the GZIP file format. |
Although there are many compression algorithms, Zip and GZIP are possibly the most commonly used. Thus you can easily manipulate your compressed data with the many tools available for reading and writing these formats.
출처 : http://www.linuxtopia.org/
'Language > JAVA' 카테고리의 다른 글
Multifile storage with Zip (ZIP으로 여러 파일 저장하기) (0) | 2010.11.17 |
---|---|
자바 간단한 GZIP 압축 예제 (0) | 2010.11.17 |
JAVA File Locking(자바 파일 잠금) (0) | 2010.11.17 |
자바 메모리를 사용한 큰 파일 조작하기 (0) | 2010.11.17 |
다수의 JAR파일들 중, 특정 Class 찾기 (0) | 2010.01.11 |