BinaryReader.Read7BitEncodedInt Method

July 28, 2014

Reads in a 32-bit integer in compressed format.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Protected Friend Function Read7BitEncodedInt As Integer

Return Value

Type: System.Int32
A 32-bit integer in compressed format.

ExceptionCondition
EndOfStreamException

The end of the stream is reached.

ObjectDisposedException

The stream is closed.

IOException

An I/O error occurs.

FormatException

The stream is corrupted.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft