资源简介
开发环境VisualStudio 2010,文件中包含工程文件
代码片段和文件信息
/* bits.c -- output variable-length bit strings
* Copyright (C) 1992-1993 Jean-loup Gailly
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License see the file COPYING.
*/
/*
* PURPOSE
*
* Output variable-length bit strings. Compression can be done
* to a file or to memory. (The latter is not supported in this version.)
*
* DISCUSSION
*
* The PKZIP “deflate“ file format interprets compressed file data
* as a sequence of bits. Multi-bit strings in the file may cross
* byte boundaries without restriction.
*
* The first bit of each byte is the low-order bit.
*
* The routines in this file allow a variable-length bit value to
* be output right-to-left (useful for literal values). For
* left-to-right output (useful for code strings from the tree routines)
* the bits must have been reversed first with bi_reverse().
*
* For in-memory compression the compressed bit stream goes directly
* into the requested output buffer. The input data is read in blocks
* by the mem_read() function. The buffer is limited to 64K on 16 bit
* machines.
*
* INTERFACE
*
* void bi_init (FILE *zipfile)
* Initialize the bit string routines.
*
* void send_bits (int value int length)
* Write out a bit string taking the source bits right to
* left.
*
* int bi_reverse (int value int length)
* Reverse the bits of a bit string taking the source bits left to
* right and emitting them right to left.
*
* void bi_windup (void)
* Write out any remaining bits in an incomplete byte.
*
* void copy_block(char *buf unsigned len int header)
* Copy a stored block to the zip file storing first the length and
* its one‘s complement if requested.
*
*/
#include “gzip.h“
/* ===========================================================================
* Local data used by the “bit string“ routines.
*/
local unsigned short bi_buf = 0;
/* Output buffer. bits are inserted starting at the bottom (least significant
* bits).
*/
#define Buf_size (8 * 2*sizeof(char))
/* Number of bits used within bi_buf. (bi_buf might be implemented on
* more than 16 bits on some systems.)
*/
local int bi_valid = 0;
/* Number of valid bits in bi_buf. All bits above the last valid bit
* are always zero.
*/
int (* read_buf ) OF(( char * buf unsigned size ));
/* Current input function. Set to mem_read for in-memory compression */
/* ===========================================================================
* Initialize the bit string routines.
*/
void bi_init ( void )
{
bi_buf = 0;
bi_valid = 0;
/* Set the defaults for file compression. They are set by memcompress
* for in-memory compression.
*/
read_buf = mem_read;
}
/* ===========================================================================
* Send a value on a given number of bits.
* IN assertion: length <= 16 and value fits in length bits.
*/
void send_bits( value length )
int value; /* value
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4665 2013-03-07 16:21 zip\bits.c
文件 8912 2013-03-07 16:22 zip\Debug\bits.obj
文件 4818 2013-03-07 16:27 zip\Debug\cl.command.1.tlog
文件 11714 2013-03-07 16:27 zip\Debug\CL.read.1.tlog
文件 2516 2013-03-07 16:27 zip\Debug\CL.write.1.tlog
文件 12017 2013-03-07 16:22 zip\Debug\deflate.obj
文件 433664 2013-03-07 16:27 zip\Debug\gzip.exe
文件 2 2013-03-07 16:22 zip\Debug\gzip.exe.em
文件 68 2013-03-07 16:22 zip\Debug\gzip.exe.em
文件 381 2013-03-07 16:27 zip\Debug\gzip.exe.intermediate.manifest
文件 406 2013-03-07 16:23 zip\Debug\gzip.exe.manifest
文件 958844 2013-03-07 16:27 zip\Debug\gzip.ilk
文件 48 2013-03-07 16:27 zip\Debug\gzip.lastbuildstate
文件 1902 2013-03-07 16:27 zip\Debug\gzip.log
文件 11070 2013-03-07 16:22 zip\Debug\gzip.obj
文件 1969152 2013-03-07 16:27 zip\Debug\gzip.pdb
文件 0 2013-03-07 16:22 zip\Debug\gzip.write.1.tlog
文件 198 2013-03-07 16:22 zip\Debug\gzip_manifest.rc
文件 25323 2013-03-07 16:22 zip\Debug\inflate.obj
文件 1840 2013-03-07 16:27 zip\Debug\li
文件 3504 2013-03-07 16:27 zip\Debug\li
文件 1008 2013-03-07 16:27 zip\Debug\li
文件 5960 2013-03-07 16:27 zip\Debug\main.obj
文件 356 2013-03-07 16:27 zip\Debug\mt.command.1.tlog
文件 214 2013-03-07 16:27 zip\Debug\mt.read.1.tlog
文件 214 2013-03-07 16:27 zip\Debug\mt.write.1.tlog
文件 418 2013-03-07 16:22 zip\Debug\rc.command.1.tlog
文件 198 2013-03-07 16:22 zip\Debug\rc.read.1.tlog
文件 206 2013-03-07 16:22 zip\Debug\rc.write.1.tlog
文件 28234 2013-03-07 16:22 zip\Debug\trees.obj
............此处省略26个文件信息
相关资源
- C语言程序300集(pdf,清晰)
- 维吉尼亚加密解密的C语言实现
- rsa签名 C语言实现
- 学生成绩管理系统C语言、C++6.0 控制台
- C语言实现计算乘法逆元
- DH算法代码实现
- 0-1背包问题-递归算法 c语言实现
- c语言银行系统源代码(改进版)
- C语言程序课程设计商品进销存管理程
- 991“数据结构与C语言程序设计”考试
- IIR滤波器 ccs程序,C语言和汇编
- c语言实现字典顺序排序
- 用C语言编写的《订餐管理系统》
- c语言随机生成迷宫和走迷宫图形版含
- 人工智能实验报告以及C语言源程序
- C语言实现模糊控制
- C语言实战-学生成绩管理系统
- 通过 S-Function 集成 C 代码进行仿真
- fpmax*源代码 c语言实现
- C语言教案 环节完整 谭浩强版
- 一位滑动窗口协议模拟 c语言实现
- ADS7809C语言程序
- 找最近对的分治法 C语言实现
- 贪心算法解决骑士游历问题C语言版
- DFT FFT 的C语言实现方法及程序
- 影碟出租管理系统C语言编写 用于课
- linuxc语言信号量爸爸女儿儿子橘子苹
- 一个FTP客户端的设计与实现C实现
- 用C语言编写二叉排序树
- 酒店管理系统c语言实现133784
评论
共有 条评论