s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
ByteStream
chevron_left
Classes
struct
ByteStream
search
Properties
data_object
Length
data_object
Position
data_object
ReadRemaining
data_object
Writable
Methods
functions
Compress
functions
Decompress
functions
Dispose
functions
EnsureCanRead
functions
EnsureCanWrite
functions
Read
functions
ReadArray
functions
ReadObject
functions
ToArray
functions
TryRead
functions
Write
functions
WriteArray
Static Methods
functions
Create
functions
CreateReader
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
.
sealed
Sandbox.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.