thatgui
Advanced Member
- Joined
- Apr 2, 2009
- Messages
- 3,048
I trying to extract the pxml file and the icon from a pnd.
Currently im opening the pnd as a stream, and reading it backwards from the end in blocks, till i find the first four characters of the pxml in it. But this is very slow, and there is a chance (depending on the block size) that i hit the middle of my comparison string, so the start of the pxml is "overlooked".
So whats the clever way to do it ? And is the "spacing" between pxml and the icon always one byte ?
PS.: extracting pxml and icon via mounting the pnd is no option -> takes too much time
Currently im opening the pnd as a stream, and reading it backwards from the end in blocks, till i find the first four characters of the pxml in it. But this is very slow, and there is a chance (depending on the block size) that i hit the middle of my comparison string, so the start of the pxml is "overlooked".
So whats the clever way to do it ? And is the "spacing" between pxml and the icon always one byte ?
PS.: extracting pxml and icon via mounting the pnd is no option -> takes too much time
Last edited by a moderator: