Common logging, networking, compression, and other miscellaneous functionality for RuneJS.
loggeris exported as a singleton Pino logging wrapper.- Methods:
logger.info(...messages: any[])logger.debug(...messages: any[])logger.warn(...messages: any[])logger.error(...messages: any[])logger.trace(...messages: any[])logger.fatal(...messages: any[])logger.destination(logDir: string)logger.setOptions(options: Pino.LoggerOptions)logger.setPrettyPrint(prettyPrint: boolean)logger.setTimeFormat(format: TimeFn)
- Methods:
ByteBufferis also exported at the root level.- Node
Uint8Arraywrapper with additional utility functions. - Unified configurable
getandputmethods to easily move bytes within the buffer. - Int24, Smart, Long and String type support.
- Big endian, little endian, and mixed endian support.
- Bit access through
openBitBuffer(),putBits(), andcloseBitBuffer()
- Node
Handles various color conversions needed by the game and tooling.
RGB(A)HSL(Hue, Saturation, Lightness)HSV(Hue, Saturation, Value/Brightness)HCL(Hue, Chroma, Luminance)LAB(Lightness, A, B)
- Exported class
Gziphandles Gzip compression and decompression. - Exported class
Bzip2handles Bzip2 compression and decompression.
Exports a single class Crc32 that generates CRC32 checksums for binary data files.
Provides XTEA encryption and decryption functionality, as well as a key file loader.
- Exported as class
Xtea
SocketServer- Handles connections made to a RuneJS socket server.
SocketServer.launch(serverName, hostName, port, connectionHandlerFactory)- Spins up a new Node Socket server with the specified host and port.
ServerConfigOptions- Options for a configured Socket server, imported using the
parseServerConfig()function.
- Options for a configured Socket server, imported using the
