<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>Circular Buffer for .NET</title><link>http://circularbuffer.codeplex.com/Project/ProjectRss.aspx</link><description>A complete implementation of a generic circular buffer and circular byte stream for the .NET Framework 3.5.</description><item><title>New Post: AllowOverflow</title><link>http://circularbuffer.codeplex.com/Thread/View.aspx?ThreadId=79470</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Actually I think I missunderstand the way your CircularBuffer works.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I'd like to do this :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;            int capacity = 5;
            var buffer = new CircularBuffer&amp;lt;byte&amp;gt;(capacity, true);
            for (byte i = 0; i &amp;lt; capacity * 3; ++i)
                buffer.Put(i);&lt;/pre&gt;
&lt;p&gt;and have in the buffer&amp;nbsp;{ 10, 11, 12, 13, 14, 15 }&lt;/p&gt;
&lt;p&gt;Is it possible ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>noon</author><pubDate>Thu, 31 Dec 2009 21:43:49 GMT</pubDate><guid isPermaLink="false">New Post: AllowOverflow 20091231094349P</guid></item><item><title>New Post: AllowOverflow</title><link>http://circularbuffer.codeplex.com/Thread/View.aspx?ThreadId=79470</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I guess AllowOverflow is the property to choose whether one CircularBuffer can overwrite his old values. If it's the case, it doesn't work when you reach the buffer&amp;nbsp;capacity.&amp;nbsp;It will cause an IndexOutOfRangeException in the Put method because of this :&amp;nbsp;&lt;/p&gt;
&lt;div id="_mcePaste" style="left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden"&gt;buffer[tail] = item;&lt;/div&gt;
&lt;div id="_mcePaste" style="left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (tail++ == capacity)&lt;/div&gt;
&lt;div id="_mcePaste" style="left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tail = 0&lt;/div&gt;
&lt;pre&gt;buffer[tail] = item;
if (tail++ == capacity)
    tail = 0;&lt;/pre&gt;
&lt;p&gt;When entering the Put method, if tail is equal to the buffer capacity - 1&amp;nbsp;then tail will be equal to the capacity when exiting.&amp;nbsp;The next time we enter Put, tail will be equal to the buffer capacity and it will crash.&amp;nbsp;Maybe the code should have been :&lt;/p&gt;
&lt;p&gt;
&lt;pre style="color:#000000;font-family:Consolas, 'Courier New', Courier, monospace;font-size:1em;margin:8px"&gt;buffer[tail] = item;
if (++tail == capacity)
    tail = 0;&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>noon</author><pubDate>Thu, 31 Dec 2009 21:22:03 GMT</pubDate><guid isPermaLink="false">New Post: AllowOverflow 20091231092203P</guid></item><item><title>Released: v0.1.0 (May 22, 2009)</title><link>http://circularbuffer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27751</link><description>&lt;div&gt;Initial release. Contains CircularBuffer&amp;lt;T&amp;gt; class and CircularStream class. Includes unit tests for basic functionality.&lt;/div&gt;</description><author></author><pubDate>Sat, 23 May 2009 01:05:55 GMT</pubDate><guid isPermaLink="false">Released: v0.1.0 (May 22, 2009) 20090523010555A</guid></item><item><title>Updated Release: v0.1.0 (May 22, 2009)</title><link>http://circularbuffer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27751</link><description>&lt;div&gt;Initial release. Contains CircularBuffer&amp;lt;T&amp;gt; class and CircularStream class. Includes unit tests for basic functionality.&lt;/div&gt;</description><author>alexreg</author><pubDate>Sat, 23 May 2009 01:05:55 GMT</pubDate><guid isPermaLink="false">Updated Release: v0.1.0 (May 22, 2009) 20090523010555A</guid></item><item><title>Updated Release: v0.1.0 (May 22, 2009)</title><link>http://circularbuffer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27751</link><description>&lt;div&gt;Initial release. Contains CircularBuffer&amp;lt;T&amp;gt; class and CircularStream class. Includes unit tests for basic functionality.&lt;/div&gt;</description><author>alexreg</author><pubDate>Sat, 23 May 2009 01:05:29 GMT</pubDate><guid isPermaLink="false">Updated Release: v0.1.0 (May 22, 2009) 20090523010529A</guid></item><item><title>Created Release: v0.1.0 (May 22, 2009)</title><link>http://circularbuffer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27751</link><description>&lt;div&gt;Initial release. Contains CircularBuffer&amp;lt;T&amp;gt; class and CircularStream class. Includes unit tests for basic functionality.&lt;/div&gt;</description><author>alexreg</author><pubDate>Sat, 23 May 2009 00:48:40 GMT</pubDate><guid isPermaLink="false">Created Release: v0.1.0 (May 22, 2009) 20090523124840A</guid></item></channel></rss>