package hl
Available on hl
staticinlinefromAddress(h:Int64):BytesCreates an pointer at a given memory address (highly unsafe)
staticinlinefromBytes(bytes:Bytes):BytesstaticfromValue(v:Dynamic, length:Ref<Int>):BytesstaticinlinegetArray<T>(a:Array<T>):BytesGet the bytes reference from an array of basic types (no copy occurs)
address():Int64Returns the address value of the bytes. On 32 bit system the upper 32 bits will always be 0
blit(pos:Int, src:Bytes, srcPos:Int, len:Int):Voidcompare(pos:Int, bytes:Bytes, bytesPos:Int, size:Int):Intcompare16(bytes:Bytes, size:Int):Intfill(pos:Int, size:Int, v:Int):Voidfind(pos:Int, size:Int, bytes:Bytes, bytesPos:Int, bytesSize:Int):IntinlinegetF32(pos:Int):F32inlinegetF64(pos:Int):FloatinlinegetI32(pos:Int):IntinlinegetUI16(pos:Int):IntinlinegetUI8(pos:Int):Intoffset(delta:Int):BytesPlease 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.
parseFloat(pos:Int, size:Int):FloatparseInt(pos:Int, size:Int):Null<Int>inlinesetF32(pos:Int, value:F32):VoidinlinesetF64(pos:Int, value:Float):VoidinlinesetI32(pos:Int, value:Int):VoidinlinesetUI16(pos:Int, v:Int):VoidinlinesetUI8(pos:Int, value:Int):IntsortF64(pos:Int, length:Int, f:(Float, Float) ‑> Int):VoidsortI32(pos:Int, length:Int, f:(Int, Int) ‑> Int):Voidsub(pos:Int, size:Int):Bytessubtract(other:Bytes):IntReturns an offset between the two pointers. This might overflow in 64 bits if the addresses of the two pointers differs by more than 4GB
inlinetoBytes(len:Int):Bytesucs2Length(bytePos:Int):Intutf16ToUtf8(len:Int, outSize:Ref<Int>):Bytesutf8ToUtf16(bytePos:Int, outSize:Ref<Int>):Bytes
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/hl/Bytes.html