This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace bsn.Har.Multipart { | |
public class CircularBuffer<T>: IAsyncEnumerator<T> { | |
private readonly Func<T[], int, int, CancellationToken, Task<int>> fillBufferAsync; | |
private readonly T[] buffer; | |
private int head; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace bsn.Har.Multipart { | |
public interface IKmpMatcher<in T> { | |
void Reset(int patternPosition = 0); | |
bool Next(T value); | |
int Index { | |
get; | |
} | |
} |