Last active
August 29, 2015 14:02
-
-
Save jechtom/282220a87e694e09b076 to your computer and use it in GitHub Desktop.
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
bool ok = false; | |
// make sure all data has been written | |
while (fileStream.Position < fileStream.Length || !(ok = true)) | |
{ | |
var data = _dataSerializer.Read(fileStream); | |
if (data == null) // if null, data is corrupted | |
break; | |
checkedDataLength = fileStream.Position; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment