@@ -203,6 +203,18 @@ public function writeInt32LE($value, $offset = null) {
203
203
$ this ->insert ($ format , $ value , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
204
204
}
205
205
206
+ public function writeInt64BE ($ value , $ offset = null ) {
207
+ $ format = 'J ' ;
208
+ $ this ->checkForOverSize (0xffffffffffffffff , $ value );
209
+ $ this ->insert ($ format , $ value , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
210
+ }
211
+
212
+ public function writeInt64LE ($ value , $ offset = null ) {
213
+ $ format = 'P ' ;
214
+ $ this ->checkForOverSize (0xffffffffffffffff , $ value );
215
+ $ this ->insert ($ format , $ value , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
216
+ }
217
+
206
218
public function read ($ offset , $ length ) {
207
219
$ format = 'a ' . $ length ;
208
220
return $ this ->extract ($ format , $ offset , $ length );
@@ -233,4 +245,14 @@ public function readInt32LE($offset) {
233
245
return $ this ->extract ($ format , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
234
246
}
235
247
248
+ public function readInt64BE ($ offset ) {
249
+ $ format = 'J ' ;
250
+ return $ this ->extract ($ format , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
251
+ }
252
+
253
+ public function readInt64LE ($ offset ) {
254
+ $ format = 'P ' ;
255
+ return $ this ->extract ($ format , $ offset , $ this ->lengthMap ->getLengthFor ($ format ));
256
+ }
257
+
236
258
}
0 commit comments