资源简介
基于C语言的 跨平台 zip unzip实现,源码。多平台公用。
代码片段和文件信息
#define ZIP_STD
#ifdef ZIP_STD
#include
#include
#include
#include
#ifdef _MSC_VER
#include // microsoft puts it here
#else
#include
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
#include
#define lumkdir(t) (mkdir(t))
#else
#include
#define lumkdir(t) (mkdir(t0755))
#endif
#include
#include
#include “unzip.h“
//
typedef unsigned short WORD;
#define _tcslen strlen
#define _tcsicmp stricmp
#define _tcsncpy strncpy
#define _tcsstr strstr
#define INVALID_HANDLE_VALUE 0
#ifndef _T
#define _T(s) s
#endif
#ifndef S_IWUSR
#define S_IWUSR 0000200
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
//
#else
#include
#include
#include
#include
#include
#include “unzip.h“
#endif
//
#ifdef UNICODE
#define _tsprintf swprintf
#else
#define _tsprintf sprintf
#endif
// THIS FILE is almost entirely based upon code by Jean-loup Gailly
// and Mark Adler. It has been modified by Lucian Wischik.
// The modifications were: incorporate the bugfixes of 1.1.4 allow
// unzipping to/from handles/pipes/files/memory encryption unicode
// a windowsish api and putting everything into a single .cpp file.
// The original code may be found at http://www.gzip.org/zlib/
// The original copyright text follows.
//
//
//
// zlib.h -- interface of the ‘zlib‘ general purpose compression library
// version 1.1.3 July 9th 1998
//
// Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
//
// This software is provided ‘as-is‘ without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose
// including commercial applications and to alter it and redistribute it
// freely subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
//
// Jean-loup Gailly Mark Adler
// jloup@gzip.org madler@alumni.caltech.edu
//
//
// The data format used by the zlib library is described by RFCs (Request for
// Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
// (zlib format) rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
//
//
// The ‘zlib‘ compression library provides in
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-21 14:20 Zip\
文件 153447 2019-01-21 14:23 Zip\unzip.cpp
文件 10361 2019-01-21 14:14 Zip\zip.h
文件 10433 2019-01-21 14:23 Zip\unzip.h
文件 119800 2019-01-21 14:14 Zip\zip.cpp
- 上一篇:蜂群算法C语言实现
- 下一篇:支持异常和中断的CPU verilog设计和仿真代码
相关资源
- 蜂群算法C语言实现
- c语言实现iir滤波器
- 学生成绩管理系统含二叉树内容
- C语言实现的SM2数字签名验证
- 系统循环码C语言实现
- 利用TCP协议实现文件传输C语言
- TDMA算法 C语言编写
- linux C语言 socket通信聊天小程序
- MAX485两个单片机半双工通信
- c51单片机24C01-24C16读写程序含PROTEUS仿
- 一个基于DSP的软件无线电的c语言设计
- C语言龙贝格求积算法
- pic18系列单片机C语言程序例程
- c语言宿舍管理查询软件源代码数据结
- C语言实现 多线程文件传输
- 人工智能之动物识别C语言
- 串口接受和发送数据--C语言代码,非
- C语言课程设计记事本
- 操作系统C语言实现银行家算法,键盘
- 《数据结构》C语言版 实验报告 基础
- 飞行弹道计算C语言
- 多目标粒子群算法C代码
- c语言实现 通过rs232可实现上位机和下
- 火车票管理系统C语言数据结构
- 纯C语言写的https模拟GET和POST
- C语言CRC32校验
- C语言名题精选百则源代码
- GoBackN协议的C语言实现
- 算术编码纯C语言实现
- C语言windowlinux平台的SNTP实现
评论
共有 条评论