Creates a new EoReader instance for the specified data.
the byte array containing the input data
Gets the chunked reading mode for the reader.
True if the reader is in chunked reading mode
Sets the chunked reading mode for the reader.
In chunked reading mode:
the new chunked reading mode
Gets the current position in the input data.
The current position in the input data
If chunked reading mode is enabled, gets the number of bytes remaining in the current chunk. Otherwise, gets the total number of bytes remaining in the input data.
The number of bytes remaining
Reads a raw byte from the input data.
A raw byte
Reads an array of raw bytes from the input data.
An array of raw bytes
Reads an encoded 1-byte integer from the input data.
A decoded 1-byte integer
Reads an encoded string from the input data.
A decoded string
Reads an encoded 4-byte integer from the input data.
A decoded 4-byte integer
Reads an encoded 2-byte integer from the input data.
A decoded 2-byte integer
Reads a string from the input data.
A string
Reads an encoded 3-byte integer from the input data.
A decoded 3-byte integer
Creates a new EoReader whose input data is a shared subsequence of this reader's data.
The input data of the new reader will start at position `index` in this reader and contain up to `length` bytes. 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 false.
Optionalindex: number = ...the position in this reader at which the data of the new reader will start; must be non-negative. Defaults to the current reader position.
Optionallength: number = ...the length of the shared subsequence of data to supply to the new reader;
must be non-negative. Defaults to the length of the remaining data starting from index.
The new reader
A class for reading EO data from a sequence of bytes.
`EoReader` features a chunked reading mode, which is important for accurate emulation of the official game client.
See
Chunked Reading