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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? adler32.cs

?? C#開發的QQ,希望大家喜歡.獻給大家作參考
?? CS
字號:
// Adler32.cs - Computes Adler32 data checksum of a data stream
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 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;

namespace ICSharpCode.SharpZipLib.Checksums 
{
	
	/// <summary>
	/// Computes Adler32 checksum for a stream of data. An Adler32
	/// checksum is not as reliable as a CRC32 checksum, but a lot faster to
	/// compute.
	/// 
	/// The specification for Adler32 may be found in RFC 1950.
	/// ZLIB Compressed Data Format Specification version 3.3)
	/// 
	/// 
	/// From that document:
	/// 
	///      "ADLER32 (Adler-32 checksum)
	///       This contains a checksum value of the uncompressed data
	///       (excluding any dictionary data) computed according to Adler-32
	///       algorithm. This algorithm is a 32-bit extension and improvement
	///       of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
	///       standard.
	/// 
	///       Adler-32 is composed of two sums accumulated per byte: s1 is
	///       the sum of all bytes, s2 is the sum of all s1 values. Both sums
	///       are done modulo 65521. s1 is initialized to 1, s2 to zero.  The
	///       Adler-32 checksum is stored as s2*65536 + s1 in most-
	///       significant-byte first (network) order."
	/// 
	///  "8.2. The Adler-32 algorithm
	/// 
	///    The Adler-32 algorithm is much faster than the CRC32 algorithm yet
	///    still provides an extremely low probability of undetected errors.
	/// 
	///    The modulo on unsigned long accumulators can be delayed for 5552
	///    bytes, so the modulo operation time is negligible.  If the bytes
	///    are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
	///    and order sensitive, unlike the first sum, which is just a
	///    checksum.  That 65521 is prime is important to avoid a possible
	///    large class of two-byte errors that leave the check unchanged.
	///    (The Fletcher checksum uses 255, which is not prime and which also
	///    makes the Fletcher check insensitive to single byte changes 0 -
	///    255.)
	/// 
	///    The sum s1 is initialized to 1 instead of zero to make the length
	///    of the sequence part of s2, so that the length does not have to be
	///    checked separately. (Any sequence of zeroes has a Fletcher
	///    checksum of zero.)"
	/// </summary>
	/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream"/>
	/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream"/>
	public sealed class Adler32 : IChecksum
	{
		/// <summary>
		/// largest prime smaller than 65536
		/// </summary>
		readonly static uint BASE = 65521;
		
		uint checksum;
		
		/// <summary>
		/// Returns the Adler32 data checksum computed so far.
		/// </summary>
		public long Value {
			get {
				return checksum;
			}
		}
		
		/// <summary>
		/// Creates a new instance of the Adler32 class.
		/// The checksum starts off with a value of 1.
		/// </summary>
		public Adler32()
		{
			Reset();
		}
		
		/// <summary>
		/// Resets the Adler32 checksum to the initial value.
		/// </summary>
		public void Reset()
		{
			checksum = 1;
		}
		
		/// <summary>
		/// Updates the checksum with the byte b.
		/// </summary>
		/// <param name="bval">
		/// The data value to add. The high byte of the int is ignored.
		/// </param>
		public void Update(int bval)
		{
			// We could make a length 1 byte array and call update again, but I
			// would rather not have that overhead
			uint s1 = checksum & 0xFFFF;
			uint s2 = checksum >> 16;
			
			s1 = (s1 + ((uint)bval & 0xFF)) % BASE;
			s2 = (s1 + s2) % BASE;
			
			checksum = (s2 << 16) + s1;
		}
		
		/// <summary>
		/// Updates the checksum with an array of bytes.
		/// </summary>
		/// <param name="buffer">
		/// The source of the data to update with.
		/// </param>
		public void Update(byte[] buffer)
		{
			Update(buffer, 0, buffer.Length);
		}
		
		/// <summary>
		/// Updates the checksum with the bytes taken from the array.
		/// </summary>
		/// <param name="buf">
		/// an array of bytes
		/// </param>
		/// <param name="off">
		/// the start of the data used for this update
		/// </param>
		/// <param name="len">
		/// the number of bytes to use for this update
		/// </param>
		public void Update(byte[] buf, int off, int len)
		{
			if (buf == null) {
				throw new ArgumentNullException("buf");
			}
			
			if (off < 0 || len < 0 || off + len > buf.Length) {
				throw new ArgumentOutOfRangeException();
			}
			
			//(By Per Bothner)
			uint s1 = checksum & 0xFFFF;
			uint s2 = checksum >> 16;
			
			while (len > 0) {
				// We can defer the modulo operation:
				// s1 maximally grows from 65521 to 65521 + 255 * 3800
				// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
				int n = 3800;
				if (n > len) {
					n = len;
				}
				len -= n;
				while (--n >= 0) {
					s1 = s1 + (uint)(buf[off++] & 0xFF);
					s2 = s2 + s1;
				}
				s1 %= BASE;
				s2 %= BASE;
			}
			
			checksum = (s2 << 16) | s1;
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情在线看| 蓝色福利精品导航| 日韩激情视频在线观看| 国产一区二区三区综合| 欧美无人高清视频在线观看| 精品久久久久久综合日本欧美| 亚洲色大成网站www久久九九| 日韩黄色免费电影| 日本高清不卡在线观看| 精品国产乱码久久久久久图片 | 成人午夜免费av| 欧美日韩成人综合在线一区二区| 中文字幕不卡在线观看| 免费观看成人鲁鲁鲁鲁鲁视频| 91欧美激情一区二区三区成人| 欧美成人一级视频| 日韩精品午夜视频| 91激情在线视频| 欧美国产1区2区| 国产精品18久久久久久久久| 欧美精品777| 亚洲va天堂va国产va久| 日本久久电影网| 国产精品久久福利| 粉嫩av一区二区三区| 久久新电视剧免费观看| 久久99日本精品| 欧美一区二区成人| 青娱乐精品视频在线| 欧美日韩不卡一区| 亚洲bt欧美bt精品777| 在线免费av一区| 亚洲永久精品大片| 欧美色图天堂网| 亚洲一区二区av电影| 欧美无乱码久久久免费午夜一区 | 亚洲成人免费影院| 欧美视频在线一区| 亚洲一区二区三区在线播放| 色婷婷激情综合| 一区二区三区四区在线播放| 一本久道中文字幕精品亚洲嫩| 亚洲品质自拍视频网站| 在线观看视频一区二区| 亚洲成人免费电影| 日韩欧美中文字幕公布| 国产美女主播视频一区| 国产亚洲精品bt天堂精选| 韩国三级电影一区二区| 国产精品欧美一区喷水| jvid福利写真一区二区三区| 亚洲精品综合在线| 欧美美女视频在线观看| 蜜乳av一区二区三区| www日韩大片| 波多野结衣欧美| 亚洲一二三区在线观看| 精品捆绑美女sm三区| 成人h精品动漫一区二区三区| 亚洲精选在线视频| 精品久久久久久最新网址| 不卡的av网站| 婷婷激情综合网| 久久美女高清视频| 91黄色在线观看| 久久99国产精品久久99果冻传媒| 亚洲国产精品av| 3d成人动漫网站| 成人免费不卡视频| 日韩精品一区第一页| 欧美国产综合色视频| 欧美巨大另类极品videosbest | 成人网男人的天堂| 亚洲一区二区视频在线| 国产午夜精品一区二区| 欧美亚洲一区二区在线| 国产一区二区三区久久久| 一区二区三区91| 国产丝袜在线精品| 在线播放中文一区| 成人网在线播放| 国内久久婷婷综合| 亚洲chinese男男1069| 国产精品成人免费在线| 欧美白人最猛性xxxxx69交| 欧美制服丝袜第一页| 国产福利精品导航| 日韩成人午夜电影| 亚洲一区二区视频在线观看| 欧美高清在线视频| ww久久中文字幕| 日韩欧美aaaaaa| 欧美日韩午夜在线视频| 91小视频免费观看| 国产99久久久精品| 国产一区免费电影| 免费高清在线一区| 日韩国产欧美一区二区三区| 尤物av一区二区| 国产精品家庭影院| 国产精品入口麻豆九色| 久久久久久久久久看片| 3d成人h动漫网站入口| 精品视频一区三区九区| 91国偷自产一区二区三区观看| 国产成人精品免费| 国产**成人网毛片九色 | 99久久久无码国产精品| 国产精品一线二线三线| 精品无码三级在线观看视频| 五月天激情综合网| 石原莉奈一区二区三区在线观看| 一区二区三区丝袜| 一区二区三区日韩| 亚洲一二三专区| 日日夜夜免费精品视频| 亚洲3atv精品一区二区三区| 午夜视频一区在线观看| 首页国产丝袜综合| 日韩高清一区二区| 另类欧美日韩国产在线| 麻豆一区二区三区| 国产在线观看一区二区| 国产精品资源在线| 成人ar影院免费观看视频| 成人听书哪个软件好| 99久久久精品| 欧美天堂亚洲电影院在线播放| 欧美视频你懂的| 欧美一区二区三区在线观看视频| 日韩一区二区视频在线观看| 亚洲精品一区二区三区在线观看 | 国产精品888| 成人av集中营| 欧美另类videos死尸| 欧美白人最猛性xxxxx69交| 国产网站一区二区三区| 综合精品久久久| 亚洲成人动漫在线免费观看| 久久99热狠狠色一区二区| 成人网页在线观看| 欧亚洲嫩模精品一区三区| 日韩欧美一区二区三区在线| 国产亚洲精品精华液| 亚洲一区二区三区四区在线免费观看| 婷婷六月综合网| 成人免费看视频| 欧美三级电影在线观看| 精品国产91亚洲一区二区三区婷婷| 欧美精彩视频一区二区三区| 亚洲制服丝袜一区| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品伦理一区二区| 亚洲第一搞黄网站| 国产成人免费在线观看| 欧美在线一区二区| 国产亚洲1区2区3区| 亚洲国产毛片aaaaa无费看| 韩国v欧美v日本v亚洲v| 欧美在线三级电影| 国产亚洲人成网站| 视频一区国产视频| 97精品久久久久中文字幕 | 欧美色网一区二区| 欧美国产日产图区| 免费精品视频在线| 91久久久免费一区二区| 精品处破学生在线二十三| 亚洲免费观看在线观看| 国产在线精品不卡| 欧美一级高清片在线观看| 亚洲欧洲成人av每日更新| 免费久久99精品国产| 欧美亚洲动漫精品| 中文字幕在线免费不卡| 九一久久久久久| 在线播放欧美女士性生活| 亚洲丝袜另类动漫二区| 国产黄色精品网站| 精品va天堂亚洲国产| 日韩**一区毛片| 欧美日韩精品一区视频| 日韩伦理电影网| 粉嫩一区二区三区在线看| 精品国产免费人成电影在线观看四季 | 欧美日韩成人激情| 一区二区欧美国产| www.亚洲国产| 一区在线中文字幕| 不卡一二三区首页| 日韩毛片视频在线看| 粉嫩aⅴ一区二区三区四区五区| 久久影视一区二区| 国产高清成人在线| 国产女人18水真多18精品一级做| 久99久精品视频免费观看| 精品国产免费一区二区三区香蕉| 另类小说图片综合网| 精品国精品国产| 国模无码大尺度一区二区三区|