编译zlib
来源:互联网 发布:看耳朵知健康 编辑:程序博客网 时间:2024/05/16 11:11
一、前言
在编译之前,先描述一下lzlib、zlib、lzip的
Lzlib is a data compression library providing in-memory LZMA compressionand decompression functions, including integrity checking of thedecompressed data. The compressed data format used by the library is thelzip format.Lzlib is written in C.
lzlib压缩库提供了在内存中的 LZMA 压缩和解压算法功能,包括对数据进行完整性检查。压缩格式是 lzip。
zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system. The zlib data format is itself portable across platforms. Unlike the LZW compression method used in Unix compress(1) and in the GIF image format, the compression method currently used in zlib essentially never expands the data. (LZW can double or triple the file size in extreme cases.) zlib's memory footprint is also independent of the input data and can be reduced, if necessary, at some cost in compression. A more precise, technical discussion of both points is available on another page.
zlib是免费、通用、合法的,也就是说它不受任何专利限制---无损数据压缩库适用于几乎任何计算机和操作系统。 zlib的数据结构本身是跨平台的。不像LZW压缩算法只能用于unix压缩和GIF图片格式,只用zlib压缩算法从来不用扩展数据。(在极短情况下,LZW可以两倍或三倍的压缩文件) zlib内存占用多少依赖于输入的数据。
编译zlib-1.2.8 windows下编译: nmake -f win32/Makefile.msc
详见Makefile.msc
Linux下编译: ./configure;make
1、使用静态库
在vs下,需要把zlib.h、zconf.h和从zlib工程中生成的zlib.lib文件放到你的代码目录下,并且设置项目属性:project->settings->link->category选择input,在library modules中的最后面输入一个空格和zlib.lib,在lgnore libraries输入MSVCRT(否则这个默认库和zlib库会有冲突),然后project-> settings-> c/c++->Category中选择Code generation,在Use run-time Library中选择Debug Multithreaded DLL。
如果library modules中输入zlib.lib了,那么在代码中添加
#include "zlib.h即可,否则还要加入下面这句
#pragma comment( lib, "zlib.lib")
2、使用动态库
同样,把zlib.h、zconf.h和从zlib工程中生成的zlib1.lib和zlib1.dll复制到自己的源程序文件夹中,代码中添加
#include "zlib.h"#pragma comment( lib, "zlib1.lib")
- zlib编译
- 编译zlib
- 编译zlib
- zlib编译
- zlib交叉编译过程
- zlib 交叉编译方法
- 编译 zlib 问题
- 编译 zlib 问题
- 编译boost zlib
- vc9编译zlib
- 1、交叉编译zlib
- 编译Zlib注意
- zlib编译,windows/Linux
- mingw编译zlib
- zlib window上编译
- Android 编译 zlib
- mingw32 下编译 zlib
- zlib x264 交叉编译
- Shell script - let命令
- 设计模式 --- 动态代理模式--demo2
- php实现mail函数的两种基本方法
- ngx 配置文件解析和初始化(http未执行之前)
- 【DP】Longest Repeated Sequence
- 编译zlib
- VB2013读EXCEL表确定Sheet的有效内容
- java nio
- 用友软件错误号 53 ,getaccessmode文件未找
- 避免快照
- AppStore新应用上传指南
- 为何 JavaBean 要实现 serializable 接口?
- 字典树(第四节代码实现中有我的一个语法疑惑,忘高手们解惑啊)
- C++随机函数