资源简介
可是使用quazip类库实现文件和文件夹的压缩与解压缩,经测试可以使用

代码片段和文件信息
#include
#include
#include
#include
#include ject>
#include “zlib.h“
#include
#include “quazip.h“
#include “quazipfile.h“
#include
#define QTCONSOLE 1
#include “gojobzip.h“
static inline QString UserLanguage()
{
/////////////QSettings setter;
QString languserlanguagesistemlangqt;
QLocale loci = QLocale::system();
languser = getenv(“LANG“);
languser = languser.toLower();
languagesistem = loci.name();
languagesistem = languagesistem.toLower();
languagesistem = languagesistem.left(2);
/* Window XP Prof MUI Multiuser == stay only “c“ language && user setting setenv !!! */
if (languagesistem == “c“) {
if (languser.size() > 2 && languser.contains(“_“)) {
languagesistem = languser.left(2);
}
}
return languagesistem;
}
int main(int argc char *argv[]) {
/*
QCoreApplication a( argc argv );
QString a1 a2 a3 la dis folderzip;
const QString na = “press“;
la = UserLanguage();
QTextStream out(stdout);
////out.setFieldWidth(60);
////out.setPadChar(‘.‘);
if (!argv[1]) {
out << “Usage language “ << la << “:\n“;
out << “GZ file\n“;
out << na << “ gz filename\n“;
out << “\n“;
out << “ZIP dir\n“;
out << na << “ zip /pathtozip/ /path_out_zipfile/\n“;
out << na << “ zip /pathtozip/ ./ (to output zip on current folder.) \n“;
out << “zip file name take from folder name.\n“;
out << “UnZIP dir\n“;
out << na << “ unzip zipfile.zip /pathout/\n“;
out << “\n“;
out << “\n“;
return 0;
}
a1 = argv[1];
a2 = argv[2];
a3 = argv[3];
if (a1.size() > 1) {
if (a1 == “gz“) {
out << “Start gz compress... on file .. “ << a2 << “ \n“;
bool s = MakeGzipOneFile(a2);
if (s) {
out << “File “ << a2 << “ is ready.\n“;
} else {
out << “File “ << a2 << “ not found.\n“;
}
} else if (a1 == “unzip“) {
out << “Start unzip file... “ << a2 << “ \n“;
QDir check(a3);
check.mkpath(a3);
if (check.exists() && is_file(a2)) {
dis = check.absolutePath();
if (!dis.endsWith(“/“)) {
dis.append(“/“);
}
bool uz = UnzipTo(a2dis);
if (uz) {
out << “UnZip “ << a2 << “ is ready.\n“;
} else {
out << “UnZip “ << a2 << “ file or dir not found.\n“;
}
} else {
out << “UnZip “ << a2 << “ file or
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-10-11 13:35 zip_unzip\
文件 931 2011-10-11 13:30 zip_unzip\console_zip_unzip.pro
文件 8005 2011-10-11 14:03 zip_unzip\console_zip_unzip.pro.user
文件 6029 2011-10-11 14:05 zip_unzip\main.cpp
目录 0 2011-10-11 13:32 zip_unzip\quazip\
文件 4908 2011-10-11 13:31 zip_unzip\quazip\crypt.h
文件 10141 2011-10-11 13:31 zip_unzip\quazip\gojobzip.h
文件 4284 2011-10-11 13:31 zip_unzip\quazip\ioapi.c
文件 2610 2011-10-11 13:31 zip_unzip\quazip\ioapi.h
文件 8034 2011-10-11 13:31 zip_unzip\quazip\quazip.cpp
文件 14890 2011-10-11 13:31 zip_unzip\quazip\quazip.h
文件 10338 2011-10-11 13:31 zip_unzip\quazip\quazipfile.cpp
文件 19132 2011-10-11 13:31 zip_unzip\quazip\quazipfile.h
文件 1829 2011-10-11 13:31 zip_unzip\quazip\quazipfileinfo.h
文件 664 2011-10-11 13:32 zip_unzip\quazip\quazipnewinfo.cpp
文件 3664 2011-10-11 13:32 zip_unzip\quazip\quazipnewinfo.h
文件 50913 2011-10-11 13:32 zip_unzip\quazip\unzip.c
文件 13322 2011-10-11 13:32 zip_unzip\quazip\unzip.h
文件 9544 2011-10-11 13:32 zip_unzip\quazip\zconf.h
文件 38655 2011-10-11 13:32 zip_unzip\quazip\zip.c
文件 9082 2011-10-11 13:32 zip_unzip\quazip\zip.h
文件 66188 2011-10-11 13:32 zip_unzip\quazip\zlib.h
- 上一篇:STM32外部计数器程序
- 下一篇:FPGA设计16进制加减计数器
相关资源
- mgn-mqt82.exe
- Trojan-Qt5-Windows-0.0.4.rar
- 酒店管理系统基于Qt Creator5)
- 介绍几种压缩算法及《笨笨数据压缩
- vtk QT做的三维地质可视化系统2of2
- Qt局域网聊天软件
- Qt Creator opengl实现四元数鼠标控制轨迹
- QT局域网聊天系统(基于QT5.修改过)
- qt-电子点菜系统
- C 餐厅叫号系统(QT平)
- QT 实现文件下载
- qt图像处理
- QT,JPEG解码源代码(已完成)
- 很好的一个小波变换图像压缩程序
- Qt 播放音频文件
- lzw压缩,解压缩算法
- 哈夫曼压缩算法(源代码 实现报告)
- jpeg图像压缩实例代码
- Qt 读取16进制的data文件
- lz4压缩解压工具x64和x86
- 块体形状对岩石黏结颗粒模型力学特
- MQTT+串口(usart)透传
- 7-zip压缩包
- 压缩包免费破解密码工具
- 易语言QQTEA算法源码
- VC工程转Qt工程文件的工具
- 超强JPG图片压缩工具,减小图片文件
- 大型强子对撞机在压缩质量情景中寻
- MQTT推送Demo
- 基于Linux、QT的视频监控系统的设计与
评论
共有 条评论