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

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

?? inflaterinputstream.cs

?? 基于.net的c#壓縮程序
?? CS
?? 第 1 頁 / 共 2 頁
字號:
// InflaterInputStream.cs
//
// Copyright (C) 2001 Mike Krueger
// Copyright (C) 2004 John Reilly
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library.  Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
// 
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module.  An independent module is a module which is not derived from
// or based on this library.  If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so.  If you do not wish to do so, delete this
// exception statement from your version.

using System;
using System.Security.Cryptography;
using System.IO;

using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Checksums;

namespace ICSharpCode.SharpZipLib.Zip.Compression.Streams 
{

   /// <summary>
   /// An input buffer customised for use by <see cref="InflaterInputStream"/>
   /// </summary>
   /// <remarks>
   /// The buffer supports decryption of incoming data.
   /// </remarks>
	public class InflaterInputBuffer
	{
		/// <summary>
		/// Initialise a new instance of <see cref="InflaterInputBuffer"/>
		/// </summary>
		/// <param name="stream">The stream to buffer.</param>
		public InflaterInputBuffer(Stream stream)
		{
			inputStream = stream;
			rawData = new byte[4096];
			clearText = rawData;
		}
		
		/// <summary>
		/// Get the length of bytes bytes in the <see cref="RawData"/>
		/// </summary>
		public int RawLength
		{
			get { 
				return rawLength; 
			}
		}
		
		/// <summary>
		/// Get the contents of the raw data buffer.
		/// </summary>
		/// <remarks>This may contain encrypted data.</remarks>
		public byte[] RawData
		{
			get {
				return rawData;
			}
		}
		
		/// <summary>
		/// Get the number of useable bytes in <see cref="ClearText"/>
		/// </summary>
		public int ClearTextLength
		{
			get {
				return clearTextLength;
			}
		}
		
		/// <summary>
		/// Get the contents of the clear text buffer.
		/// </summary>
		public byte[] ClearText
		{
			get {
				return clearText;
			}
		}
		
		/// <summary>
		/// Get/set the number of bytes available
		/// </summary>
		public int Available
		{
			get { return available; }
			set { available = value; }
		}

		/// <summary>
		/// Call <see cref="Inflater.SetInput"/> passing the current clear text buffer contents.
		/// </summary>
		/// <param name="inflater">The inflater to set input for.</param>
		public void SetInflaterInput(Inflater inflater)
		{
			if ( available > 0 ) {
				inflater.SetInput(clearText, clearTextLength - available, available);
				available = 0;
			}
		}

		/// <summary>
		/// Fill the buffer from the underlying input stream.
		/// </summary>
		public void Fill()
		{
			rawLength = 0;
			int toRead = rawData.Length;
			
			while (toRead > 0) {
				int count = inputStream.Read(rawData, rawLength, toRead);
				if ( count <= 0 ) {
					if (rawLength == 0) {
						throw new SharpZipBaseException("Unexpected EOF"); 
					}
					break;
				}
				rawLength += count;
				toRead -= count;
			}

			if ( cryptoTransform != null ) {
				clearTextLength = cryptoTransform.TransformBlock(rawData, 0, rawLength, clearText, 0);
			}
			else {
				clearTextLength = rawLength;
			}

			available = clearTextLength;
		}
		
		/// <summary>
		/// Read a buffer directly from the input stream
		/// </summary>
		/// <param name="buffer">The buffer to fill</param>
		/// <returns>Returns the number of bytes read.</returns>
		public int ReadRawBuffer(byte[] buffer)
		{
			return ReadRawBuffer(buffer, 0, buffer.Length);
		}

		/// <summary>
		/// Read a buffer directly from the input stream
		/// </summary>
		/// <param name="outBuffer">The buffer to read into</param>
		/// <param name="offset">The offset to start reading data into.</param>
		/// <param name="length">The number of bytes to read.</param>
		/// <returns>Returns the number of bytes read.</returns>
		public int ReadRawBuffer(byte[] outBuffer, int offset, int length)
		{
			if ( length <= 0 ) {
				throw new ArgumentOutOfRangeException("length");
			}
			
			int currentOffset = offset;
			int currentLength = length;
			
			while ( currentLength > 0 ) {
				if ( available <= 0 ) {
					Fill();
					if (available <= 0) {
						return 0;
					}
				}
				int toCopy = Math.Min(currentLength, available);
				System.Array.Copy(rawData, rawLength - (int)available, outBuffer, currentOffset, toCopy);
            currentOffset += toCopy;
				currentLength -= toCopy;
				available -= toCopy;
			}
			return length;
		}
		
		/// <summary>
		/// Read clear text data from the input stream.
		/// </summary>
		/// <param name="outBuffer">The buffer to add data to.</param>
		/// <param name="offset">The offset to start adding data at.</param>
		/// <param name="length">The number of bytes to read.</param>
		/// <returns>Returns the number of bytes actually read.</returns>
		public int ReadClearTextBuffer(byte[] outBuffer, int offset, int length)
		{
			if ( length <= 0 ) {
				throw new ArgumentOutOfRangeException("length");
			}
			
			int currentOffset = offset;
			int currentLength = length;
			
			while ( currentLength > 0 ) {
				if ( available <= 0 ) {
					Fill();
					if (available <= 0) {
						return 0;
					}
				}
				
				int toCopy = Math.Min(currentLength, available);
				System.Array.Copy(clearText, clearTextLength - (int)available, outBuffer, currentOffset, toCopy);
				currentOffset += toCopy;
				currentLength -= toCopy;
				available -= toCopy;
			}
			return length;
		}
		
		/// <summary>
		/// Read a byte from the input stream.
		/// </summary>
		/// <returns>Returns the byte read.</returns>
		public int ReadLeByte()
		{
			if (available <= 0) {
				Fill();
				if (available <= 0) {
					throw new ZipException("EOF in header");
				}
			}
			byte result = (byte)(rawData[rawLength - available] & 0xff);
			available -= 1;
			return result;
		}
		
		/// <summary>
		/// Read an unsigned short in little endian byte order.
		/// </summary>
		public int ReadLeShort()
		{
			return ReadLeByte() | (ReadLeByte() << 8);
		}
		
		/// <summary>
		/// Read an int in little endian byte order.
		/// </summary>
		public int ReadLeInt()
		{
			return ReadLeShort() | (ReadLeShort() << 16);
		}
		
		/// <summary>
		/// Read an int baseInputStream little endian byte order.
		/// </summary>
		public long ReadLeLong()
		{
			return ReadLeInt() | (ReadLeInt() << 32);
		}

		/// <summary>
		/// Get/set the <see cref="ICryptoTransform"/> to apply to any data.
		/// </summary>
		/// <remarks>Set this value to null to have no transform applied.</remarks>
		public ICryptoTransform CryptoTransform
		{
			set { 
				cryptoTransform = value;
				if ( cryptoTransform != null ) {
					if ( rawData == clearText ) {
						if ( internalClearText == null ) {
							internalClearText = new byte[4096];
						}
						clearText = internalClearText;
					}
					clearTextLength = rawLength;
					if ( available > 0 ) {
						cryptoTransform.TransformBlock(rawData, rawLength - available, available, clearText, rawLength - available);
					}
				} else {
					clearText = rawData;
					clearTextLength = rawLength;
				}
			}
		}

		#region Instance Fields
		int rawLength;
		byte[] rawData;
		
		int clearTextLength;
		byte[] clearText;
		
		byte[] internalClearText;
		
		int available;
		
		ICryptoTransform cryptoTransform;
		Stream inputStream;
		#endregion
	}
	
	/// <summary>
	/// This filter stream is used to decompress data compressed using the "deflate"
	/// format. The "deflate" format is described in RFC 1951.
	///
	/// This stream may form the basis for other decompression filters, such
	/// as the <see cref="ICSharpCode.SharpZipLib.GZip.GZipInputStream">GZipInputStream</see>.
	///
	/// Author of the original java version : John Leuner.
	/// </summary>
	public class InflaterInputStream : Stream
	{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品精品国产高清一毛片一天堂| 国产.欧美.日韩| 欧美人与禽zozo性伦| 午夜精品久久一牛影视| 欧美精品色综合| 乱中年女人伦av一区二区| 欧美一区二区大片| 国产精品18久久久久久久久久久久| 日韩欧美国产综合一区| 国产精品综合二区| 亚洲品质自拍视频| 欧美乱妇15p| 国产精品一区二区91| 亚洲摸摸操操av| 91麻豆精品国产91| 国产乱码精品一区二区三区五月婷| 国产免费成人在线视频| 91久久精品一区二区三区| 亚洲高清视频的网址| 精品伦理精品一区| 不卡影院免费观看| 天天操天天干天天综合网| 久久五月婷婷丁香社区| 日本精品一区二区三区四区的功能| 五月综合激情婷婷六月色窝| 国产亚洲综合色| 欧洲av一区二区嗯嗯嗯啊| 久久91精品久久久久久秒播| 一区精品在线播放| 日韩你懂的在线观看| 91在线观看高清| 人妖欧美一区二区| 一区在线观看免费| 欧美成人精品福利| 日本伦理一区二区| 国产成人午夜精品5599| 亚洲电影在线免费观看| 国产蜜臀av在线一区二区三区| 欧美日韩日日夜夜| 成人sese在线| 激情成人午夜视频| 亚洲一区二区三区影院| 国产精品乱码一区二区三区软件 | 麻豆国产精品一区二区三区| 国产成人欧美日韩在线电影| 蜜乳av一区二区| 久久久久久久久久久99999| 欧美无砖专区一中文字| 国产99精品在线观看| 免费xxxx性欧美18vr| 亚洲乱码国产乱码精品精可以看| 精品国产sm最大网站| 欧美日韩另类国产亚洲欧美一级| 成人网在线播放| 看片网站欧美日韩| 午夜视频在线观看一区二区三区| 国产精品丝袜一区| 精品99999| 欧美一激情一区二区三区| 欧美午夜电影网| 色婷婷精品大视频在线蜜桃视频| 国产成人综合视频| 激情都市一区二区| 激情六月婷婷久久| 久久国产精品99久久人人澡| 日韩1区2区日韩1区2区| 亚洲国产欧美一区二区三区丁香婷| 国产精品乱码一区二区三区软件| 久久亚洲春色中文字幕久久久| 日韩美女主播在线视频一区二区三区| 欧美性大战久久久久久久蜜臀 | 欧美日韩国产高清一区二区三区| 成人va在线观看| eeuss鲁片一区二区三区| 国产成人精品免费在线| 风间由美一区二区av101| 国产超碰在线一区| 国产很黄免费观看久久| 国产美女精品一区二区三区| 久久国产生活片100| 久久99蜜桃精品| 国产九色精品成人porny| 国产剧情一区二区| 成人手机在线视频| 99精品视频一区| 一本色道久久综合精品竹菊| 色8久久人人97超碰香蕉987| 在线视频欧美精品| 欧美区视频在线观看| 欧美日韩aaaaaa| 91精品国产综合久久蜜臀 | 久久奇米777| 国产亚洲综合性久久久影院| 国产精品视频你懂的| 亚洲色图在线播放| 亚洲一二三四久久| 日韩电影在线免费看| 国内精品嫩模私拍在线| 岛国精品在线观看| 欧美在线视频你懂得| 欧美一区二区视频网站| 久久久99精品久久| 国产精品久久久久久户外露出| 一区二区三区资源| 日本一不卡视频| 国产精品主播直播| 色猫猫国产区一区二在线视频| 欧美日韩国产高清一区二区三区 | 欧美精品123区| 久久久久一区二区三区四区| 自拍偷拍国产亚洲| 视频精品一区二区| 国产精品影音先锋| 日本精品视频一区二区| 日韩精品一区二区三区视频| 国产精品的网站| 午夜电影一区二区三区| 高清国产一区二区| 欧美综合欧美视频| 久久免费偷拍视频| 亚洲国产精品久久艾草纯爱| 国产精品综合二区| 欧美视频一区二区三区| 久久久久久久久久久黄色| 亚洲一区二区三区影院| 国产v综合v亚洲欧| 9191久久久久久久久久久| 久久久久久久久伊人| 亚洲成人资源在线| a级高清视频欧美日韩| 欧美一二区视频| 亚洲精品免费在线播放| 国产精品影视在线观看| 337p亚洲精品色噜噜狠狠| 中文字幕一区二区视频| 久久精品国产一区二区| 在线看一区二区| 国产情人综合久久777777| 日本vs亚洲vs韩国一区三区| 日本精品一级二级| 欧美国产日韩一二三区| 裸体健美xxxx欧美裸体表演| 91福利在线播放| 自拍偷拍亚洲综合| 成人永久aaa| 精品国产乱码久久久久久老虎| 亚洲综合丝袜美腿| 99麻豆久久久国产精品免费优播| 欧美videossexotv100| 天天av天天翘天天综合网色鬼国产 | 亚洲在线观看免费视频| 成人免费视频免费观看| 久久天天做天天爱综合色| 日韩一区欧美二区| 日本精品视频一区二区三区| 国产精品青草综合久久久久99| 国产剧情一区二区| 精品国产伦一区二区三区免费| 免费欧美日韩国产三级电影| 欧美亚洲一区二区三区四区| 亚洲美女免费视频| 91偷拍与自偷拍精品| 国产精品婷婷午夜在线观看| 国产精品一区二区三区乱码| 久久久久久久久久美女| 国产在线精品免费av| 日韩免费电影一区| 国内精品国产三级国产a久久| 日韩午夜av一区| 久久99精品国产| 26uuu欧美日本| 国产九色sp调教91| 国产精品妹子av| 99精品视频在线观看| 伊人性伊人情综合网| 欧美在线一二三| 日韩精品一区第一页| 欧美一级欧美一级在线播放| 久久精品99久久久| 国产网站一区二区三区| 成a人片国产精品| 一区二区三区中文字幕精品精品| 91黄视频在线| 日本怡春院一区二区| 欧美精品一区二区在线播放| 国产69精品久久777的优势| 亚洲天堂2014| 欧美久久久久中文字幕| 久久国产精品免费| 中国av一区二区三区| 91高清视频在线| 麻豆传媒一区二区三区| 中文字幕欧美国产| 欧美性三三影院| 久久福利视频一区二区| 亚洲国产成人在线| 欧美日韩二区三区| 国产麻豆午夜三级精品| 亚洲精品国产成人久久av盗摄 | 国产麻豆精品95视频|