Static methods

staticalloc(length:Int):Bytes

staticinlinefastGet(b:BytesData, pos:Int):Int

Read the most efficiently possible the n-th byte of the data. Behavior when reading outside of the available data is unspecified.

staticofHex(s:String):Bytes

Convert hexadecimal string to Bytes. Support only straight hex string ( Example: "0FDA14058916052309" )

staticofString(s:String, ?encoding:Encoding):Bytes

Returns bytes representation of the given String, using specific encoding (UTF-8 by default)

Variables

read onlylength:Int

Methods

blit(pos:Int, src:Bytes, srcpos:Int, len:Int):Void

fill(pos:Int, len:Int, value:Int):Void

inlineget(pos:Int):Int

inlinegetDouble(pos:Int):Float

Returns the IEEE double precision value at given position (in low endian encoding). Result is unspecified if reading outside of the bounds

inlinegetFloat(pos:Int):Float

Returns the IEEE single precision value at given position (in low endian encoding). Result is unspecified if reading outside of the bounds

inlinegetInt32(pos:Int):Int

Returns the 32 bit integer at given position (in low endian encoding).

inlinegetInt64(pos:Int):Int64

Returns the 64 bit integer at given position (in low endian encoding).

getString(pos:Int, len:Int, ?encoding:Encoding):String

inlinegetUInt16(pos:Int):Int

Returns the 16 bit unsigned integer at given position (in low endian encoding).

inlineset(pos:Int, v:Int):Void

inlinesetDouble(pos:Int, v:Float):Void

Store the IEEE double precision value at given position in low endian encoding. Result is unspecified if writing outside of the bounds.

inlinesetFloat(pos:Int, v:Float):Void

Store the IEEE single precision value at given position in low endian encoding. Result is unspecified if writing outside of the bounds.

inlinesetInt32(pos:Int, v:Int):Void

Store the 32 bit integer at given position (in low endian encoding).

inlinesetInt64(pos:Int, v:Int64):Void

Store the 64 bit integer at given position (in low endian encoding).

inlinesetUInt16(pos:Int, v:Int):Void

Store the 16 bit unsigned integer at given position (in low endian encoding).

sub(pos:Int, len:Int):Bytes

toString():String

Returns string representation of the bytes as UTF8