当前位置: 首页>>代码示例>>C#>>正文


C# StreamManipulator.CopyBytes方法代码示例

本文整理汇总了C#中ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator.CopyBytes方法的典型用法代码示例。如果您正苦于以下问题:C# StreamManipulator.CopyBytes方法的具体用法?C# StreamManipulator.CopyBytes怎么用?C# StreamManipulator.CopyBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator的用法示例。


在下文中一共展示了StreamManipulator.CopyBytes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CopyStored

        public int CopyStored(StreamManipulator input, int length)
        {
            length = Math.Min(Math.Min(length, WindowSize - windowFilled), input.AvailableBytes);
            int copied;

            int tailLen = WindowSize - windowEnd;
            if (length > tailLen) {
                copied = input.CopyBytes(window, windowEnd, tailLen);
                if (copied == tailLen) {
                    copied += input.CopyBytes(window, 0, length - tailLen);
                }
            } else {
                copied = input.CopyBytes(window, windowEnd, length);
            }

            windowEnd = (windowEnd + copied) & WindowMask;
            windowFilled += copied;
            return copied;
        }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:19,代码来源:OutputWindow.cs

示例2: CopyStored

 public int CopyStored(StreamManipulator input, int length)
 {
     int num;
     length = Math.Min(Math.Min(length, 0x8000 - this.windowFilled), input.AvailableBytes);
     int num2 = 0x8000 - this.windowEnd;
     if (length > num2)
     {
         num = input.CopyBytes(this.window, this.windowEnd, num2);
         if (num == num2)
         {
             num += input.CopyBytes(this.window, 0, length - num2);
         }
     }
     else
     {
         num = input.CopyBytes(this.window, this.windowEnd, length);
     }
     this.windowEnd = (this.windowEnd + num) & 0x7fff;
     this.windowFilled += num;
     return num;
 }
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:21,代码来源:OutputWindow.cs

示例3: CopyStored

 public int CopyStored(StreamManipulator input, int length)
 {
     length = Math.Min(Math.Min(length, 32768 - this.windowFilled), input.AvailableBytes);
     int num = 32768 - this.windowEnd;
     int num2;
     if (length > num)
     {
         num2 = input.CopyBytes(this.window, this.windowEnd, num);
         if (num2 == num)
         {
             num2 += input.CopyBytes(this.window, 0, length - num);
         }
     }
     else
     {
         num2 = input.CopyBytes(this.window, this.windowEnd, length);
     }
     this.windowEnd = (this.windowEnd + num2 & 32767);
     this.windowFilled += num2;
     return num2;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:21,代码来源:OutputWindow.cs

示例4: CopyStored

		/// <summary>
		/// Copy from input manipulator to internal window
		/// </summary>
		/// <param name="input">source of data</param>
		/// <param name="len">length of data to copy</param>
		/// <returns>the number of bytes copied</returns>
		public int CopyStored(StreamManipulator input, int len)
		{
			len = Math.Min(Math.Min(len, WINDOW_SIZE - windowFilled), input.AvailableBytes);
			int copied;
			
			int tailLen = WINDOW_SIZE - windowEnd;
			if (len > tailLen) {
				copied = input.CopyBytes(window, windowEnd, tailLen);
				if (copied == tailLen) {
					copied += input.CopyBytes(window, 0, len - tailLen);
				}
			} else {
				copied = input.CopyBytes(window, windowEnd, len);
			}
			
			windowEnd = (windowEnd + copied) & WINDOW_MASK;
			windowFilled += copied;
			return copied;
		}
开发者ID:Sajaki,项目名称:uniuploader,代码行数:25,代码来源:OutputWindow.cs


注:本文中的ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator.CopyBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。