Skip to content

Instantly share code, notes, and snippets.

@bnayae
Created May 12, 2018 19:28
Show Gist options
  • Save bnayae/806835d8a75b8bbf1f3a1436b2efde66 to your computer and use it in GitHub Desktop.
Save bnayae/806835d8a75b8bbf1f3a1436b2efde66 to your computer and use it in GitHub Desktop.
var subArray = new int[BUFFER_SIZE];
for (int i = 0; i < Data.Length - (BUFFER_SIZE + 1); i += BUFFER_SIZE)
{
Array.Copy(Data, i, subArray, 0, BUFFER_SIZE);
if (subArray[subArray.Length - 1] != i + BUFFER_SIZE - 1)
throw new Exception(); // avoid optimization
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment