Skip to content

A simple, single file, implementation of a circular buffer in C#.

Notifications You must be signed in to change notification settings

jamie-tillman/CircullarBuffer-CSharp

 
 

Repository files navigation

Simple implementation of a circular buffer in C#.
This is a single file implementation, which means that you only need to copy 
the CircularBuffer.cs file to your project and use it.

What is a circular buffer? 

"A circular buffer, cyclic buffer or ring buffer is a data structure 
that uses a single, fixed-size buffer as if it were connected end-to-end."
This means that you have predefined memory usage. Push and Pop operations 
are always O(1). Index access is also O(1).

More info @ wikipedia: http://en.wikipedia.org/wiki/Circular_buffer


License:
 ----------------------------------------------------------------------------
 "THE BEER-WARE LICENSE" (Revision 42):
 Joao Portela wrote this file. As long as you retain this notice you
 can do whatever you want with this stuff. If we meet some day, and you think
 this stuff is worth it, you can buy me a beer in return.
 Joao Portela
 ----------------------------------------------------------------------------

About

A simple, single file, implementation of a circular buffer in C#.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%