You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$br = new BinaryReader($fileData, Endian::ENDIAN_LITTLE);
34
+
// or
35
+
$fileResource = fopen('somefile.bin', 'rb');
36
+
$br = new BinaryReader($fileResource, Endian::ENDIAN_LITTLE);
37
+
33
38
$magic = $br->readUInt32();
34
39
$offset = $br->readUInt16();
35
40
$length = $br->readUInt16();
@@ -38,7 +43,7 @@ $length = $br->readUInt16();
38
43
39
44
Methods
40
45
---
41
-
**__construct($str, $endian)** a string must be provided to use this class, an endian is optional (string [big|little], or use the constants in the Endian class), it will default to little if not provided.
46
+
**__construct($input, $endian)** a string or file resource must be provided to use this class, an endian is optional (string [big|little], or use the constants in the Endian class), it will default to little if not provided.
42
47
43
48
**readUInt8()** returns a single 8 bit byte as an unsigned integer
0 commit comments