Static methods

@:has_untypedstaticalloc(length:Int):Bytes

@:has_untypedstaticinlinefastGet(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.

@:has_untypedstaticofData(b:BytesData):Bytes

staticofHex(s:String):Bytes

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

@:has_untypedstaticofString(s:String, ?encoding:Encoding):Bytes

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

Variables

read onlylength:Int

Methods

@:has_untypedblit(pos:Int, src:Bytes, srcpos:Int, len:Int):Void

@:has_untypedcompare(other:Bytes):Int

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

@:has_untypedinlineget(pos:Int):Int

getDouble(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

getFloat(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).

@:has_untypedgetString(pos:Int, len:Int, ?encoding:Encoding):String

inlinegetUInt16(pos:Int):Int

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

@:has_untypedinlineset(pos:Int, v:Int):Void

@:has_untypedsetDouble(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.

@:has_untypedsetFloat(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).

@:has_untypedsub(pos:Int, len:Int):Bytes

@:has_untypedtoString():String

Returns string representation of the bytes as UTF8