Commons Compress 文件压缩/解压缩包

程序名称:Commons Compress

授权协议: Apache

操作系统: 跨平台

开发语言: Java

Commons Compress 介绍

Commons Compress 用以实现将文件压缩或解压成 tar、zip、bzip2 等格式。

下面代码文件压缩成zip格式:

ararchiveEntry entry = new ararchiveEntry(name, size);
arOutput.putArchiveEntry(entry);
arOutput.write(contentOfEntry);
arOutput.closeArchiveEntry();

Zip文件的解压缩:

ararchiveEntry entry = (ararchiveEntry) arInput.getNextEntry();
byte[] content = new byte[entry.getSize()];
LOOP UNTIL entry.getSize() HAS BEEN READ {
    arInput.read(content, offset, content.length - offset);
}

Commons Compress 官网

http://commons.apache.org/compress/

相关编程语言

Pacman 是一个软件包管理器, 作为 ArchLinux 发行版...
Smb4K 是KDE下的网络共享浏览器 更多屏幕截图请看:...
Wine (“Wine Is Not an Emulator” 的首字母缩写)...
虚拟桌面软件,可管理最多9个虚拟桌面,你可以用热键...
UNetbootin (Universal Netboot Installer)为一种跨...
Cobbler 可以用来快速建立 Linux 网络安装环境,它已...