Class TEoReader
Unit
Declaration
type TEoReader = class(TObject)
Description
A class for reading EO data from a sequence of bytes.
TEoReader
features a chunked reading mode, which is important for accurate emulation of the official game client.
See Chunked Reading.
Hierarchy
- TObject
- TEoReader
Overview
Methods
constructor Create; overload; |
|
constructor Create(const Data: TArray<Byte>); overload; |
|
function Slice: TEoReader; overload; |
|
function Slice(Index: Cardinal): TEoReader; overload; |
|
function Slice(Index: Cardinal; Length: Cardinal): TEoReader; overload; |
|
function GetByte: Cardinal; |
|
function GetBytes(Length: Cardinal): TArray<Byte>; |
|
function GetChar: Cardinal; |
|
function GetShort: Cardinal; |
|
function GetThree: Cardinal; |
|
function GetInt: Cardinal; |
|
function GetString: string; |
|
function GetFixedString(Length: Cardinal; Padded: Boolean = False): string; overload; |
|
function GetEncodedString: string; |
|
function GetFixedEncodedString(Length: Cardinal; Padded: Boolean = False): string; overload; |
|
procedure NextChunk; |
Properties
property ChunkedReadingMode: Boolean read FChunkedReadingMode write SetChunkedReadingMode; |
|
property Remaining: Cardinal read GetRemaining; |
|
property Position: Cardinal read GetPosition; |
Description
Methods
constructor Create; overload; |
|
Creates a new |
constructor Create(const Data: TArray<Byte>); overload; |
|
Creates a new Parameters
|
function Slice: TEoReader; overload; |
|
Creates a new The input data of the new reader will start at this reader's current position and contain all remaining data. The two reader's position and chunked reading mode will be independent. The new reader's position will be zero, and its chunked reading mode will be ReturnsThe new reader |
function Slice(Index: Cardinal): TEoReader; overload; |
|
Creates a new The input data of the new reader will start at this reader's current position and contain all remaining data. The two reader's position and chunked reading mode will be independent. The new reader's position will be zero, and its chunked reading mode will be
Parameters
ReturnsThe new reader |
function Slice(Index: Cardinal; Length: Cardinal): TEoReader; overload; |
|
Creates a new The input data of the new reader will start at this reader's current position and contain all remaining data. The two reader's position and chunked reading mode will be independent. The new reader's position will be zero, and its chunked reading mode will be
Parameters
ReturnsThe new reader |
function GetByte: Cardinal; |
|
Reads a raw byte from the input data. ReturnsA raw byte |
function GetBytes(Length: Cardinal): TArray<Byte>; |
|
Reads an array of raw bytes from the input data. ReturnsAn array of raw bytes |
function GetChar: Cardinal; |
|
Reads an encoded 1-byte integer from the input data. ReturnsA decoded 1-byte integer |
function GetShort: Cardinal; |
|
Reads an encoded 2-byte integer from the input data. ReturnsA decoded 2-byte integer |
function GetThree: Cardinal; |
|
Reads an encoded 3-byte integer from the input data. ReturnsA decoded 3-byte integer |
function GetInt: Cardinal; |
|
Reads an encoded 4-byte integer from the input data. ReturnsA decoded 4-byte integer |
function GetString: string; |
|
Reads a string from the input data. ReturnsA string |
function GetEncodedString: string; |
|
Reads an encoded string from the input data. ReturnsA decoded string |
procedure NextChunk; |
|
Moves the reader position to the start of the next chunk in the input data. Exceptions raised
|
Properties
property ChunkedReadingMode: Boolean read FChunkedReadingMode write SetChunkedReadingMode; |
|
Whether chunked reading mode is enabled for this reader. In chunked reading mode:
|
property Position: Cardinal read GetPosition; |
|
The current position in the input data. |
Generated by PasDoc 0.16.0-snapshot.