亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gzip.c

?? 手機(jī)嵌入式Linux下可用的busybox源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* vi: set sw=4 ts=4: *//* * Gzip implementation for busybox * * Based on GNU gzip Copyright (C) 1992-1993 Jean-loup Gailly. * * Originally adjusted for busybox by Charles P. Wright <cpw@unix.asb.com> *		"this is a stripped down version of gzip I put into busybox, it does *		only standard in to standard out with -9 compression.  It also requires *		the zcat module for some important functions." * * Adjusted further by Erik Andersen <andersee@debian.org> * to support files as well as stdin/stdout, and to generally behave itself wrt * command line handling. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *//* These defines are very important for BusyBox.  Without these, * huge chunks of ram are pre-allocated making the BusyBox bss  * size Freaking Huge(tm), which is a bad thing.*/#define SMALL_MEM#define DYN_ALLOC#include <stdlib.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <errno.h>#include <sys/types.h>#include <signal.h>#include <utime.h>#include <ctype.h>#include <sys/types.h>#include <unistd.h>#include <dirent.h>#include <fcntl.h>#include <time.h>#include "busybox.h"#define memzero(s, n)     memset ((void *)(s), 0, (n))#ifndef RETSIGTYPE#  define RETSIGTYPE void#endiftypedef unsigned char uch;typedef unsigned short ush;typedef unsigned long ulg;/* Return codes from gzip */#define OK      0#define ERROR   1#define WARNING 2/* Compression methods (see algorithm.doc) *//* Only STORED and DEFLATED are supported by this BusyBox module */#define STORED      0/* methods 4 to 7 reserved */#define DEFLATED    8static int method;				/* compression method *//* To save memory for 16 bit systems, some arrays are overlaid between * the various modules: * deflate:  prev+head   window      d_buf  l_buf  outbuf * unlzw:    tab_prefix  tab_suffix  stack  inbuf  outbuf * For compression, input is done in window[]. For decompression, output * is done in window except for unlzw. */#ifndef	INBUFSIZ#  ifdef SMALL_MEM#    define INBUFSIZ  0x2000	/* input buffer size */#  else#    define INBUFSIZ  0x8000	/* input buffer size */#  endif#endif#define INBUF_EXTRA  64			/* required by unlzw() */#ifndef	OUTBUFSIZ#  ifdef SMALL_MEM#    define OUTBUFSIZ   8192	/* output buffer size */#  else#    define OUTBUFSIZ  16384	/* output buffer size */#  endif#endif#define OUTBUF_EXTRA 2048		/* required by unlzw() */#ifndef DIST_BUFSIZE#  ifdef SMALL_MEM#    define DIST_BUFSIZE 0x2000	/* buffer for distances, see trees.c */#  else#    define DIST_BUFSIZE 0x8000	/* buffer for distances, see trees.c */#  endif#endif#ifdef DYN_ALLOC#  define DECLARE(type, array, size)  static type * array#  define ALLOC(type, array, size) { \      array = (type*)calloc((size_t)(((size)+1L)/2), 2*sizeof(type)); \      if (array == NULL) error_msg(memory_exhausted); \   }#  define FREE(array) {if (array != NULL) free(array), array=NULL;}#else#  define DECLARE(type, array, size)  static type array[size]#  define ALLOC(type, array, size)#  define FREE(array)#endif#define tab_suffix window#define tab_prefix prev		/* hash link (see deflate.c) */#define head (prev+WSIZE)		/* hash head (see deflate.c) */static long bytes_in;			/* number of input bytes */#define isize bytes_in/* for compatibility with old zip sources (to be cleaned) */typedef int file_t;				/* Do not use stdio */#define NO_FILE  (-1)			/* in memory compression */#define	PACK_MAGIC     "\037\036"	/* Magic header for packed files */#define	GZIP_MAGIC     "\037\213"	/* Magic header for gzip files, 1F 8B */#define	OLD_GZIP_MAGIC "\037\236"	/* Magic header for gzip 0.5 = freeze 1.x */#define	LZH_MAGIC      "\037\240"	/* Magic header for SCO LZH Compress files */#define PKZIP_MAGIC    "\120\113\003\004"	/* Magic header for pkzip files *//* gzip flag byte */#define ASCII_FLAG   0x01		/* bit 0 set: file probably ascii text */#define CONTINUATION 0x02		/* bit 1 set: continuation of multi-part gzip file */#define EXTRA_FIELD  0x04		/* bit 2 set: extra field present */#define ORIG_NAME    0x08		/* bit 3 set: original file name present */#define COMMENT      0x10		/* bit 4 set: file comment present */#define RESERVED     0xC0		/* bit 6,7:   reserved *//* internal file attribute */#define UNKNOWN 0xffff#define BINARY  0#define ASCII   1#ifndef WSIZE#  define WSIZE 0x8000			/* window size--must be a power of two, and */#endif							/*  at least 32K for zip's deflate method */#define MIN_MATCH  3#define MAX_MATCH  258/* The minimum and maximum match lengths */#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)/* Minimum amount of lookahead, except at the end of the input file. * See deflate.c for comments about the MIN_MATCH+1. */#define MAX_DIST  (WSIZE-MIN_LOOKAHEAD)/* In order to simplify the code, particularly on 16 bit machines, match * distances are limited to MAX_DIST instead of WSIZE. *//* put_byte is used for the compressed output */#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\   flush_outbuf();}/* Output a 16 bit value, lsb first */#define put_short(w) \{ if (outcnt < OUTBUFSIZ-2) { \    outbuf[outcnt++] = (uch) ((w) & 0xff); \    outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \  } else { \    put_byte((uch)((w) & 0xff)); \    put_byte((uch)((ush)(w) >> 8)); \  } \}/* Output a 32 bit value to the bit stream, lsb first */#define put_long(n) { \    put_short((n) & 0xffff); \    put_short(((ulg)(n)) >> 16); \}#define seekable()    0			/* force sequential output */#define translate_eol 0			/* no option -a yet *//* Diagnostic functions */#ifdef DEBUG#  define Assert(cond,msg) {if(!(cond)) error_msg(msg);}#  define Trace(x) fprintf x#  define Tracev(x) {if (verbose) fprintf x ;}#  define Tracevv(x) {if (verbose>1) fprintf x ;}#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}#else#  define Assert(cond,msg)#  define Trace(x)#  define Tracev(x)#  define Tracevv(x)#  define Tracec(c,x)#  define Tracecv(c,x)#endif#define WARN(msg) {if (!quiet) fprintf msg ; \		   if (exit_code == OK) exit_code = WARNING;}#ifndef MAX_PATH_LEN#  define MAX_PATH_LEN   1024	/* max pathname length */#endif	/* from zip.c: */static int zip (int in, int out);static int file_read (char *buf, unsigned size);	/* from gzip.c */static RETSIGTYPE abort_gzip (void);		/* from deflate.c */static void lm_init (ush * flags);static ulg deflate (void);		/* from trees.c */static void ct_init (ush * attr, int *methodp);static int ct_tally (int dist, int lc);static ulg flush_block (char *buf, ulg stored_len, int eof);		/* from bits.c */static void bi_init (file_t zipfile);static void send_bits (int value, int length);static unsigned bi_reverse (unsigned value, int length);static void bi_windup (void);static void copy_block (char *buf, unsigned len, int header);static int (*read_buf) (char *buf, unsigned size);	/* from util.c: */static void flush_outbuf (void);/* lzw.h -- define the lzw functions. * 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. */#if !defined(OF) && defined(lint)#  include "gzip.h"#endif#ifndef BITS#  define BITS 16#endif#define INIT_BITS 9				/* Initial number of bits per code */#define BIT_MASK    0x1f		/* Mask for 'number of compression bits' *//* Mask 0x20 is reserved to mean a fourth header byte, and 0x40 is free. * It's a pity that old uncompress does not check bit 0x20. That makes * extension of the format actually undesirable because old compress * would just crash on the new format instead of giving a meaningful * error message. It does check the number of bits, but it's more * helpful to say "unsupported format, get a new version" than * "can only handle 16 bits". *//* tailor.h -- target dependent definitions * 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. *//* The target dependent definitions should be defined here only. * The target dependent functions should be defined in tailor.c. */	/* Common defaults */#ifndef OS_CODE#  define OS_CODE  0x03			/* assume Unix */#endif#ifndef PATH_SEP#  define PATH_SEP '/'#endif#ifndef OPTIONS_VAR#  define OPTIONS_VAR "GZIP"#endif#ifndef Z_SUFFIX#  define Z_SUFFIX ".gz"#endif#ifdef MAX_EXT_CHARS#  define MAX_SUFFIX  MAX_EXT_CHARS#else#  define MAX_SUFFIX  30#endif		/* global buffers */DECLARE(uch, inbuf, INBUFSIZ + INBUF_EXTRA);DECLARE(uch, outbuf, OUTBUFSIZ + OUTBUF_EXTRA);DECLARE(ush, d_buf, DIST_BUFSIZE);DECLARE(uch, window, 2L * WSIZE);DECLARE(ush, tab_prefix, 1L << BITS);static int crc_table_empty = 1;static int foreground;					/* set if program run in foreground */static int method = DEFLATED;	/* compression method */static int exit_code = OK;		/* program exit code */static int part_nb;					/* number of parts in .gz file */static long time_stamp;				/* original time stamp (modification time) */static long ifile_size;				/* input file size, -1 for devices (debug only) */static char z_suffix[MAX_SUFFIX + 1];	/* default suffix (can be set with --suffix) */static int z_len;						/* strlen(z_suffix) */static char ifname[MAX_PATH_LEN];		/* input file name */static char ofname[MAX_PATH_LEN];		/* output file name */static int ifd;						/* input file descriptor */static int ofd;						/* output file descriptor */static unsigned insize;				/* valid bytes in inbuf */static unsigned outcnt;				/* bytes in output buffer *//* ======================================================================== * Signal and error handler. */static void abort_gzip(){	exit(ERROR);}/* =========================================================================== * Clear input and output buffers */static void clear_bufs(void){	outcnt = 0;	insize = 0;	bytes_in = 0L;}static void write_error_msg(){	fprintf(stderr, "\n");	perror("");	abort_gzip();}/* =========================================================================== * Does the same as write(), but also handles partial pipe writes and checks * for error return. */static void write_buf(int fd, void *buf, unsigned cnt){	unsigned n;	while ((n = write(fd, buf, cnt)) != cnt) {		if (n == (unsigned) (-1)) {			write_error_msg();		}		cnt -= n;		buf = (void *) ((char *) buf + n);	}}/* =========================================================================== * Run a set of bytes through the crc shift register.  If s is a NULL * pointer, then initialize the crc shift register contents instead. * Return the current crc in either case. */static ulg updcrc(uch *s, unsigned n){	static ulg crc = (ulg) 0xffffffffL;	/* shift register contents */	register ulg c;				/* temporary variable */	static unsigned long crc_32_tab[256];	if (crc_table_empty) {		unsigned long csr;      /* crc shift register */		unsigned long e=0;      /* polynomial exclusive-or pattern */		int i;                /* counter for all possible eight bit values */		int k;                /* byte being shifted into crc apparatus */		/* terms of polynomial defining this crc (except x^32): */		static const int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};		/* Make exclusive-or pattern from polynomial (0xedb88320) */		for (i = 0; i < sizeof(p)/sizeof(int); i++)			e |= 1L << (31 - p[i]);		/* Compute and print table of CRC's, five per line */		crc_32_tab[0] = 0x00000000L;		for (i = 1; i < 256; i++) {			csr = i; 		   /* The idea to initialize the register with the byte instead of		     * zero was stolen from Haruhiko Okumura's ar002		     */			for (k = 8; k; k--)				csr = csr & 1 ? (csr >> 1) ^ e : csr >> 1;			crc_32_tab[i]=csr;		}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美腿丝袜亚洲三区| 自拍偷拍国产亚洲| 免费日韩伦理电影| 欧美日韩久久一区| 一区二区在线免费观看| 9色porny自拍视频一区二区| 国产亚洲精品aa| 国产成a人无v码亚洲福利| 精品国产污污免费网站入口| 亚洲欧美自拍偷拍| av一区二区三区| 国产精品青草久久| 成人高清免费观看| 一区免费观看视频| 97se亚洲国产综合自在线不卡| 中文字幕国产精品一区二区| zzijzzij亚洲日本少妇熟睡| 久久蜜桃一区二区| 懂色av中文字幕一区二区三区| 国产欧美日韩不卡免费| 成人黄色av网站在线| 国产精品久久精品日日| 91浏览器打开| 爽好多水快深点欧美视频| 91麻豆精品91久久久久同性| 亚洲精品五月天| 欧美日韩亚洲高清一区二区| 日韩av中文在线观看| 日韩精品一区二区三区swag| 国内精品自线一区二区三区视频| 国产无遮挡一区二区三区毛片日本| 成人av集中营| 一区二区视频在线看| 欧美三级中文字| 麻豆91精品视频| 久久精品免视看| 色综合天天综合色综合av | 日韩一区二区在线免费观看| 国内成人免费视频| 亚洲色图.com| 日韩一本二本av| 国产91精品一区二区麻豆亚洲| 1区2区3区欧美| 欧美一区二区三区免费视频 | 国产色91在线| 色综合中文字幕国产 | 一区二区欧美精品| 欧美刺激午夜性久久久久久久| 夫妻av一区二区| 亚洲国产精品麻豆| 国产日韩欧美高清| 欧美高清视频www夜色资源网| 麻豆极品一区二区三区| 亚洲欧美日韩国产综合| 日韩视频一区二区三区| 99精品视频在线观看免费| 日本v片在线高清不卡在线观看| 国产精品久久三| 欧美日韩精品欧美日韩精品一综合| 韩国成人精品a∨在线观看| 亚洲综合偷拍欧美一区色| 国产亚洲欧洲一区高清在线观看| 欧美亚洲国产一区二区三区va| 国产一区二区视频在线| 亚洲国产一区二区视频| 国产亚洲一区二区三区四区| 在线成人av影院| 色综合天天视频在线观看| 国产乱人伦偷精品视频不卡| 日韩影院在线观看| 一区二区三区不卡视频在线观看| 久久久久综合网| 欧美一区二区久久| 欧美日韩国产片| 福利一区二区在线观看| 国内精品在线播放| 老司机精品视频在线| 午夜天堂影视香蕉久久| 国产精品久久99| 久久久高清一区二区三区| 日韩一区二区在线观看视频播放| 一本色道久久综合亚洲精品按摩| 国产成人久久精品77777最新版本| 日韩av高清在线观看| 午夜精品久久一牛影视| 亚洲裸体在线观看| 国产精品久久久久久亚洲毛片| 久久人人爽爽爽人久久久| 欧美一区二区三区喷汁尤物| 欧美日韩综合在线| 欧美三级日韩在线| 欧美天堂亚洲电影院在线播放| 色婷婷狠狠综合| 色哟哟精品一区| 99re免费视频精品全部| www.日韩精品| 97se亚洲国产综合自在线观| 99re成人精品视频| 色噜噜久久综合| 一本大道久久a久久精品综合| av在线不卡免费看| 99久久99久久精品国产片果冻| www.爱久久.com| 成人动漫av在线| 成人免费毛片a| 成人精品视频一区| 色综合久久综合网97色综合| 欧美这里有精品| 欧美日韩精品欧美日韩精品| 日韩一区和二区| 这里只有精品视频在线观看| 欧美一级片免费看| www日韩大片| 国产精品麻豆99久久久久久| 亚洲sss视频在线视频| 国产麻豆精品95视频| 91久久精品日日躁夜夜躁欧美| 日韩一卡二卡三卡四卡| 中文字幕在线观看一区二区| 日日摸夜夜添夜夜添亚洲女人| 国产不卡视频一区二区三区| 91福利在线看| 国产日韩av一区二区| 亚洲成人av免费| av高清久久久| 精品国产一区二区三区久久影院 | 日本韩国精品在线| 久久久久久免费网| 日韩黄色免费网站| 99re这里只有精品首页| 久久久久久久精| 天天操天天色综合| 日本电影亚洲天堂一区| 亚洲国产成人一区二区三区| 五月综合激情日本mⅴ| 色哟哟国产精品免费观看| 久久久噜噜噜久久人人看| 日本特黄久久久高潮| 色一情一伦一子一伦一区| 国产日韩欧美在线一区| 美女久久久精品| 51精品视频一区二区三区| 一区二区三区高清在线| 99久久99久久精品国产片果冻| 久久网站热最新地址| 日本午夜一本久久久综合| 91福利在线播放| 亚洲精品国久久99热| 国产99精品国产| 精品sm在线观看| 捆绑调教美女网站视频一区| 欧美乱妇15p| 五月婷婷激情综合| 欧美日韩日日骚| 亚洲主播在线播放| 91久久精品网| 一区二区激情小说| 色94色欧美sute亚洲线路一ni| 亚洲欧美色图小说| 色婷婷国产精品久久包臀| 亚洲色图欧洲色图| 色先锋久久av资源部| 亚洲精品免费播放| 日本乱人伦一区| 亚洲影院理伦片| 91成人免费网站| 午夜电影网一区| 日韩一区二区三区三四区视频在线观看 | 国产亚洲成aⅴ人片在线观看 | 国产成人av电影在线播放| 精品成人在线观看| 国产精品小仙女| 欧美激情一区二区三区| 丁香另类激情小说| 亚洲婷婷国产精品电影人久久| 91在线观看成人| 亚洲最新视频在线播放| 欧美写真视频网站| 日韩电影在线一区| 日韩欧美成人一区| 国产成人免费xxxxxxxx| 国产精品成人免费在线| 色又黄又爽网站www久久| 污片在线观看一区二区| 欧美一区二区三区视频免费 | 亚洲天堂2016| 色94色欧美sute亚洲线路一ni | 国产成人精品三级| **性色生活片久久毛片| 欧美在线你懂的| 全国精品久久少妇| 国产欧美日韩在线看| 日本高清不卡一区| 全国精品久久少妇| 国产精品嫩草影院av蜜臀| 欧美色综合久久| 国产精品一品视频| 一区二区视频免费在线观看| 欧美一区二区三区四区五区| 国产成人精品免费看|