Skip to content

Commit 26576c9

Browse files
author
Indrek Altpere
committed
Also add UInt8 and Int8 helpers
1 parent 39188c3 commit 26576c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/FontLib/BinaryStream.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ public function readUInt8() {
157157
return ord($this->read(1));
158158
}
159159

160+
public function readUInt8Many($count) {
161+
return array_values(unpack("C*", $this->read($count)));
162+
}
163+
160164
public function writeUInt8($data) {
161165
return $this->write(chr($data), 1);
162166
}
@@ -171,6 +175,10 @@ public function readInt8() {
171175
return $v;
172176
}
173177

178+
public function readInt8Many($count) {
179+
return array_values(unpack("c*", $this->read($count)));
180+
}
181+
174182
public function writeInt8($data) {
175183
if ($data < 0) {
176184
$data += 0x100;

0 commit comments

Comments
 (0)