C# Class AsmResolver.BinaryStreamReaderExtensions

Exibir arquivo Open project: JerreS/AsmResolver

Public Methods

Method Description
Align ( this reader, int align ) : void

Aligns the reader to a specified boundary.

CanRead ( this reader, int size ) : bool

Determines whether the reader can read up to a specific amount of bytes.

CreateSubReader ( this reader, long address ) : IBinaryStreamReader

Forks the reader by creating a new instance of a binary stream reader, using the same data source, but a different address.

ReadAlignedAsciiString ( this reader, int align ) : string

Reads an aligned ASCII string from the stream.

ReadAsciiString ( this reader ) : string

Reads a zero-terminated ASCII string from the stream.

ReadCompressedUInt32 ( this reader ) : uint

Reads a compressed unsigned integer from the stream.

ReadIndex ( this reader, IndexSize size ) : uint

Reads an index with the specified index size of the stream.

ReadSerString ( this reader ) : string

Reads a serialized UTF8 string from the steram.

TryReadCompressedUInt32 ( this reader, uint &value ) : bool

Tries to reads a compressed unsigned integer from the stream.

Method Details

Align() public static method

Aligns the reader to a specified boundary.
public static Align ( this reader, int align ) : void
reader this The reader to align.
align int The boundary to use.
return void

CanRead() public static method

Determines whether the reader can read up to a specific amount of bytes.
public static CanRead ( this reader, int size ) : bool
reader this The reader to check.
size int The size of the data to check.
return bool

CreateSubReader() public static method

Forks the reader by creating a new instance of a binary stream reader, using the same data source, but a different address.
public static CreateSubReader ( this reader, long address ) : IBinaryStreamReader
reader this The reader to fork.
address long The address of the forked reader to start at.
return IBinaryStreamReader

ReadAlignedAsciiString() public static method

Reads an aligned ASCII string from the stream.
public static ReadAlignedAsciiString ( this reader, int align ) : string
reader this The reader to use for reading the data.
align int The alignment to use.
return string

ReadAsciiString() public static method

Reads a zero-terminated ASCII string from the stream.
public static ReadAsciiString ( this reader ) : string
reader this The reader to use for reading the data.
return string

ReadCompressedUInt32() public static method

Reads a compressed unsigned integer from the stream.
public static ReadCompressedUInt32 ( this reader ) : uint
reader this The reader to use for reading the data.
return uint

ReadIndex() public static method

Reads an index with the specified index size of the stream.
public static ReadIndex ( this reader, IndexSize size ) : uint
reader this The reader to use for reading the data.
size IndexSize The size of the index.
return uint

ReadSerString() public static method

Reads a serialized UTF8 string from the steram.
public static ReadSerString ( this reader ) : string
reader this The reader to use for reading the data.
return string

TryReadCompressedUInt32() public static method

Tries to reads a compressed unsigned integer from the stream.
public static TryReadCompressedUInt32 ( this reader, uint &value ) : bool
reader this The reader to use for reading the data.
value uint The unsigned integer that was read from the stream.
return bool