fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
80 lines (79 loc) • 1.53 kB
TypeScript
/**
* Represents a writer for binary data used for tournament replays
* @private
*/
declare class BinaryWriter {
/**
* The buffer
*/
buffer: Buffer;
/**
* The current byte offset
*/
offset: number;
/**
* @param buffer The buffer
*/
constructor(buffer: Buffer);
/**
* Skip bytes
*/
skip(count: number): this;
/**
* Change the current buffer offset
*/
goto(offset: number): this;
/**
* Write an int8
*/
writeInt8(value: number): this;
/**
* Write a uint8
*/
writeUInt8(value: number): this;
/**
* Write an int16
*/
writeInt16(value: number): this;
/**
* Write a uint16
*/
writeUInt16(value: number): this;
/**
* Write an int32
*/
writeInt32(value: number): this;
/**
* Write a uint32
*/
writeUInt32(value: number): this;
/**
* Write an int64
*/
writeInt64(value: bigint): this;
/**
* Write a uint64
*/
writeUInt64(value: bigint): this;
/**
* Write a float32
*/
writeFloat32(value: number): this;
/**
* Write a string
*/
writeString(value: string, encoding?: 'utf8' | 'utf16le'): this;
/**
* Write a boolean
*/
writeBool(value: boolean): this;
/**
* Write multiple bytes
*/
writeBytes(value: Buffer): this;
/**
* Write 16 bytes as a hex string
*/
writeId(value: string): this;
}
export default BinaryWriter;