tModLoader v2024.05
A mod to make and play Terraria mods
BinaryIO Class Reference

Static Public Member Functions

static void ReadBytes (this Stream stream, byte[] buf)
static byte[] ReadBytes (this Stream stream, int len)
static byte[] ReadBytes (this Stream stream, long len)
static ReadOnlySpan< byte > ReadByteSpan (this Stream stream, int len)
static int ReadVarInt (this BinaryReader reader)
static void SafeRead (this BinaryReader reader, Action< BinaryReader > read)
static void SafeWrite (this BinaryWriter writer, Action< BinaryWriter > write)
static MemoryStream ToMemoryStream (this byte[] bytes, bool writeable=false)
static void WriteVarInt (this BinaryWriter writer, int value)