Private
_chunkedPrivate
_positionPrivate
chunkPrivate
Readonly
dataPrivate
nextGets 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
Private
findReads an encoded string with a fixed length from the input data.
A decoded string
Error
if the length is negative
the length of the string
true if the string is padded with trailing 0xFF
bytes
Reads a string with a fixed length from the input data.
A decoded string
Error
if the length is negative
the length of the string
true if the string is padded with trailing 0xFF
bytes
Private
readPrivate
readCreates 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.
Error
if index
or length
is negative.
This exception will not be thrown if index + length
is greater than the size of the
input data. Consistent with the existing over-read behaviors, the new reader will be
supplied a shared subsequence of all remaining data starting from index
.
The new reader
Optional
index: 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.
Optional
length: 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
.
Static
Private
decodeStatic
Private
removeGenerated using TypeDoc
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