Static methods

staticaddress(this:Bytes):Int64

Returns the address value of the bytes. On 32 bit system the upper 32 bits will always be 0

@:hlNative("std","bytes_blit")staticblit(this:Bytes, pos:Int, src:Bytes, srcPos:Int, len:Int):Void

@:hlNative("std","bytes_compare")staticcompare(this:Bytes, pos:Int, bytes:Bytes, bytesPos:Int, size:Int):Int

@:hlNative("std","bytes_compare16")staticcompare16(this:Bytes, bytes:Bytes, size:Int):Int

@:hlNative("std","bytes_fill")staticfill(this:Bytes, pos:Int, size:Int, v:Int):Void

@:hlNative("std","bytes_find")staticfind(this:Bytes, pos:Int, size:Int, bytes:Bytes, bytesPos:Int, bytesSize:Int):Int

staticinlinefromAddress(h:Int64):Bytes

Creates an pointer at a given memory address (highly unsafe)

@:fromstaticinlinefromBytes(bytes:Bytes):Bytes

@:hlNative("std","value_to_string")staticfromValue(v:Dynamic, length:Ref<Int>):Bytes

@:has_untypedstaticinlinegetArray<T>(a:Array<T>):Bytes

Get the bytes reference from an array of basic types (no copy occurs)

@:has_untypedstaticinlinegetF32(this:Bytes, pos:Int):F32

@:has_untypedstaticinlinegetF64(this:Bytes, pos:Int):Float

@:has_untypedstaticinlinegetI32(this:Bytes, pos:Int):Int

@:has_untypedstaticinlinegetUI16(this:Bytes, pos:Int):Int

@:has_untyped@:arrayAccessstaticinlinegetUI8(this:Bytes, pos:Int):Int

@:hlNative("std","bytes_offset")staticoffset(this:Bytes, delta:Int):Bytes

Please note that you need to retain the original unoffset'ed Bytes so it does not get garbage collected, unless the pointer was not GC allocated.

@:hlNative("std","parse_float")staticparseFloat(this:Bytes, pos:Int, size:Int):Float

@:hlNative("std","parse_int")staticparseInt(this:Bytes, pos:Int, size:Int):Null<Int>

@:has_untypedstaticinlinesetF32(this:Bytes, pos:Int, value:F32):Void

@:has_untypedstaticinlinesetF64(this:Bytes, pos:Int, value:Float):Void

@:has_untypedstaticinlinesetI32(this:Bytes, pos:Int, value:Int):Void

@:has_untypedstaticinlinesetUI16(this:Bytes, pos:Int, v:Int):Void

@:has_untyped@:arrayAccessstaticinlinesetUI8(this:Bytes, pos:Int, value:Int):Int

@:hlNative("std","bsort_f64")staticsortF64(this:Bytes, pos:Int, length:Int, f:(Float, Float) ‑> Int):Void

@:hlNative("std","bsort_i32")staticsortI32(this:Bytes, pos:Int, length:Int, f:(Int, Int) ‑> Int):Void

staticsub(this:Bytes, pos:Int, size:Int):Bytes

@:hlNative("std","bytes_subtract")staticsubtract(this:Bytes, other:Bytes):Int

Returns an offset between the two pointers. This might overflow in 64 bits if the addresses of the two pointers differs by more than 4GB

staticinlinetoBytes(this:Bytes, len:Int):Bytes

@:hlNative("std","ucs2length")staticucs2Length(this:Bytes, bytePos:Int):Int

@:hlNative("std","utf16_to_utf8")staticutf16ToUtf8(this:Bytes, len:Int, outSize:Ref<Int>):Bytes

@:hlNative("std","utf8_to_utf16")staticutf8ToUtf16(this:Bytes, bytePos:Int, outSize:Ref<Int>):Bytes