Offseting Binary File Data with php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to figure out a way to iterate through a binary file and offset values between two address by a fixed number

//-------

Why ?
I am attempting to add file data to a pre-existing  Quicktime  file....
In the Quicktime file format, the 'stco' atom stores the location of all the track data in the Quicktime file
If I add new data, all the 'stco' locations will be incorrect
So, basically, I need to change all the offsets

here is a picture of the stco data that needs to be offset
http://www.siren.cc/code/stcoTable.gif

here is the HEX data representation of the stco atom  in a hex editor:
http://www.siren.cc/code/stco_data.gif


//------



Are there any good php tutorials out there that deal with binary/hex operations of this sort ? Thus far, I have not seen many tutorials featuring functions like bin2hex(), pack, and unpack
I am a bit new to binary so any help is appreciated :)

g

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux