struct ByteStream

in global :: Sandbox

A result of SpeedTest.MemoryAlloc - to make it easy to use this instead of AllocHGlobal


public int Position { get; set; }

The current read or write position

public int Length { get; }

The total size of the data

public static ByteStream Create( int size )

Create a writable byte stream

public void Write( string str )

Writing a string

public ByteStream ReadByteStream( int size )

Read a block of data

public int Read( byte[] buffer, int offset, int count )

🤡 Doc inheritance is not yet supported.

No summary.

public ReadOnlySpan<T> ReadArray( int maxElements = 1024 )

😔 No documentation found.

public string Read( string defaultValue = )

😔 No documentation found.

public void Write( T data, bool unused = False )

😔 No documentation found.

public T Read( T defaultValue = null, bool unused = False )

😔 No documentation found.

public object ReadObject( Type objectType )

😔 No documentation found.

public T Read( )

😔 No documentation found.

public int Read( Span<byte> buffer )

😔 No documentation found.

public ByteStream Compress( )

😔 No documentation found.

public ByteStream Decompress( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public bool TryRead( ref T v )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public ReadOnlySpan<byte> ToSpan( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public byte[] ToArray( )

😔 No documentation found.

public void Write( ByteStream stream, int offset, int maxSize )

😔 No documentation found.

public void Write( byte[] rawData, int offset, int bytes )

😔 No documentation found.

public void Write( byte[] rawData )

😔 No documentation found.

public void Write( ByteStream stream )

😔 No documentation found.

public void WriteArray( T[] arr, bool includeCount = True )

😔 No documentation found.

public void WriteArray( ReadOnlySpan<T> arr )

😔 No documentation found.

public void EnsureCanRead( int size )

😔 No documentation found.

public int ReadRemaining { get; }

😔 No documentation found.

public void EnsureCanWrite( int size )

😔 No documentation found.

public void Dispose( )

😔 No documentation found.

public static ByteStream CreateReader( ReadOnlySpan<byte> data )

😔 No documentation found.

public void Write( T arr )

😔 No documentation found.

public bool Writable { get; }

😔 No documentation found.