BinaryReader.Read7BitEncodedInt Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Reads in a 32-bit integer in compressed format.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
Protected Friend Function Read7BitEncodedInt As Integer
protected internal int Read7BitEncodedInt()
Return Value
Type: System..::.Int32
A 32-bit integer in compressed format.
Exceptions
Exception | Condition |
---|---|
EndOfStreamException | The end of the stream is reached. |
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
FormatException | The stream is corrupted. |
Remarks
BinaryReader does not restore the file position after an unsuccessful read.
If the integer will fit in seven bits, the integer takes only one byte of space. The integer is expected to have been written through BinaryWriter..::.Write7BitEncodedInt.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone