public void DetectSync() { using (var stream = new MfmStream(new MemoryStream(encodedData, false))) { int readCount = 0; bool sync; while (stream.ReadByte(out sync) != -1) { Assert.Equal(syncPosition[readCount], sync); readCount++; } Assert.Equal(decodedData.Length, readCount); } }
public void DecodeMfm() { using (var stream = new MfmStream(new MemoryStream(encodedData, false))) { int readData; int readCount = 0; while ((readData = stream.ReadByte()) != -1) { Assert.Equal(decodedData[readCount], readData); readCount++; } Assert.Equal(decodedData.Length, readCount); } }