private void VerifyThatStreamResultsInCorrectNumberOfStreamParts(int streamSize, int expectedNumberOfStreamParts) { var stream = StreamHelper.GetStream(streamSize); var streamSplitter = new StreamSplitter(); int count = 0; streamSplitter.StreamPartAvailable += streamPart => count++; streamSplitter.Split(stream); Assert.That(count, Is.EqualTo(expectedNumberOfStreamParts)); }
public static IEnumerable <byte[]> splitIDX(Stream input, Encoding encoding) { return(StreamSplitter.Split(input, encoding.GetBytes(documentDelimiter), 128 * 1024)); }