zlib 1.2.11 手册

http://www.zlib.net/zlib_tech.html
    关于压缩比例和内存占用。
http://www.zlib.net/zlib_faq.html
    常见问题
http://www.zlib.net/manual.html
    手册
http://www.zlib.net/zlib_how.html
    使用示例






zlib 1.2.11 Manual
zlib 1.2.11 手册

Contents
目录

Prologue
序言
Version
版本
Introduction
介绍
Stream Data Structures
数据流结构体
Structures Usage
结构体的使用
Constants
常量
Basic Functions
基础函数
Advanced Functions
高级函数
Utility Functions
实用函数
gzip File Access Functions
gzip文件的访问函数
Checksum Functions
校验函数
Undocumented Functions
没有文档的函数(可能是作者不推荐实用的)


Prologue
序言

zlib general purpose compression library
zlib      通用     压缩库
version 1.2.11, January 15th, 2017
版本 1.2.11,2017年1月15日

Copyright (C) 1995-2017 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. 
1,本软件的源不能故意报道错;你不能说你写的是原创软件。
    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.
2,修改源代码必须有明确的标记,不应该作为自己的原创软件。
3,This notice may not be removed or altered from any source distribution.
3,这个通知不能从任何源分发或更改。
    Jean-loup Gailly       Mark Adler
    The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files rfc1950 (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
    zlib库的数据格式描述的是 RFCs 
    
    
Version
版本
#define ZLIB_VERSION "1.2.11"
#define ZLIB_VERNUM 0x12b0

Introduction
介绍

The zlib compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. 
zlib提供在内存上的压缩和解压缩的函数,包括对数据完整性的检查。
This version of the library supports only one compression method (deflation) but other algorithms will be added later and will have the same stream interface.

Compression can be done in a single step if the buffers are large enough (for example if an input file is mmap'ed), or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call.

The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951.

The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.

This library can optionally read and write gzip and raw deflate streams in memory as well.

The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib.

The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in the case of corrupted input.


Stream Data Structures
数据流结构

 

posted @ 2019-01-03 15:05  戴帽的和尚  阅读(720)  评论(0)    收藏  举报