s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference schoolTutorials
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
ByteStream
chevron_left Classes
struct
ByteStream

Properties

data_objectLengthdata_objectPositiondata_objectReadRemainingdata_objectWritable

Methods

functionsCompressfunctionsDecompressfunctionsDisposefunctionsEnsureCanReadfunctionsEnsureCanWritefunctionsReadfunctionsReadArrayfunctionsReadObjectfunctionsToArrayfunctionsTryReadfunctionsWritefunctionsWriteArray

Static Methods

functionsCreatefunctionsCreateReader
ByteStream
Write and read bytes to a stream. This aims to be as allocation free as possible while also being as fast as possible.
struct Sandbox .
sealedSandbox.System

data_object Properties 4

Length
int
The total size of the data
Position
int
The current read or write position. Values are clamped to valid range.
ReadRemaining
int
Writable
bool
Is this stream writable?

functions Methods 12

Compress (compressionLevel)
ByteStream
Decompress ()
ByteStream
Dispose ()
EnsureCanRead (size)
Validates read bounds with overflow protection
EnsureCanWrite (size)
Ensures buffer can accommodate write with overflow protection
Read ()
T
Reads an unmanaged type
ReadArray (maxElements)
T[]
Returns an array of unmanaged types
ReadObject (objectType)
object
ToArray ()
Byte[]
Get the data as an array of bytes
TryRead (v)
bool
Try to read variable, return false if not enough data
Write (stream)
WriteArray (arr)

functions Static Methods 2

Create (size)
ByteStream
Create a writable byte stream
CreateReader (data)
ByteStream
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter