package hl
Available on hlinline new (v:Int)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):Intfill (pos:Int, size:Int, v:Int):Voidfind (pos:Int, size:Int, bytes:Bytes, bytesPos:Int, bytesSize:Int):Intinline getF32 (pos:Int):F32inline getF64 (pos:Int):Floatinline getI32 (pos:Int):Intinline getUI16 (pos:Int):Intinline getUI8 (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>inline setF32 (pos:Int, value:F32):Voidinline setF64 (pos:Int, value:Float):Voidinline setI32 (pos:Int, value:Int):Voidinline setUI16 (pos:Int, v:Int):Voidinline setUI8 (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
ucs2Length (bytePos:Int):Intutf16ToUtf8 (bytePos:Int, outSize:Ref<Int>):Bytesutf8ToUtf16 (bytePos:Int, outSize:Ref<Int>):Bytesstatic inline fromAddress (h:Int64):BytesCreates an pointer at a given memory address (highly unsafe)
static inline fromBytes (bytes:Bytes):Bytesstatic fromValue (v:Dynamic, length:Ref<Int>):Bytesstatic inline getArray<T> (a:Array<T>):BytesGet the bytes reference from an array of basic types (no copy occurs)
© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/hl/Bytes.html