It's the destination byte() you have when using MiniLZO.Decompress. You need to read the uint32 of the compressed file at 0. Once you have that create the destination byte array with that size.
Private Function Decompress(ByVal buffer as byte()) as Byte()
'Declare your Reader(buffer, isBig=true)
Reader.Position = &H0
Dim decompressedSize = Reader.ReadUInt32()
Reader.Position = &H4
Dim sourceData = Reader.ReadBytes(Reader.BaseStream.Length - &H4)
Dim destinationData = New Byte(decompressedSize) {}
MiniLZO.Decompress(sourceData, destinationData)
return destinationData
End Function
I know how to use it. Remember that I told you what compression it uses lol... If I didn't do it right to begin with then it wouldn't have worked when I was testing it. It seems that no one else is having the same problem as you or either no one else has actually used the tool... But either way I tested the tool with different GPDs before I posted it and I never had the problem that you did. And either the GPD that you posted was edited or it was corrupt because it wouldn't even open in my GPD Tool. If my GPD Tool fails to parse a GPD then that means that the GPD is corrupt or invalid. So if you did post an edited GPD then you should know that I would need the original and not an edited one to look at... And please tell me you're not using Modio to handle the profile?
07-01-2012
Jappi88
Re: Spec Ops: The Line - GPD Tool
i can confirm what jizza said , a freespace entry on your gpd is Screwed....
07-01-2012
kill_seth
Re: Spec Ops: The Line - GPD Tool
Quote:
Originally Posted by JizzaBeez
I know how to use it. Remember that I told you what compression it uses lol... If I didn't do it right to begin with then it wouldn't have worked when I was testing it. It seems that no one else is having the same problem as you or either no one else has actually used the tool... But either way I tested the tool with different GPDs before I posted it and I never had the problem that you did. And either the GPD that you posted was edited or it was corrupt because it wouldn't even open in my GPD Tool. If my GPD Tool fails to parse a GPD then that means that the GPD is corrupt or invalid. So if you did post an edited GPD then you should know that I would need the original and not an edited one to look at...
First off, I never said you didn't know how to use it, I was just letting you know what I did. Like I said, I didn't edit the GPD. I loaded the game and reinlisted, which is like Prestiging in CoD, then played a game to rank up. The GPD was 100% clean and opens in Le Fluffie's GPD Viewer without any errors. Also, I got the decompression working on the exact same GPD that doesn't work with your tool. That being said, there must be something wrong within your coding. When I was testing things, the size of the destination array would throw the overflow if it wasn't correct. One more thing, the GPD also loads in my GPD viewer 100% and I was able to work with the 3 title entries with no problem at all.
First off, I never said you didn't know how to use it, I was just letting you know what I did. Like I said, I didn't edit the GPD. I loaded the game and reinlisted, which is like Prestiging in CoD, then played a game to rank up. The GPD was 100% clean and opens in Le Fluffie's GPD Viewer without any errors. Also, I got the decompression working on the exact same GPD that doesn't work with your tool. That being said, there must be something wrong within your coding. When I was testing things, the size of the destination array would throw the overflow if it wasn't correct. One more thing, the GPD also loads in my GPD viewer 100% and I was able to work with the 3 title entries with no problem at all.
Ok well I'm sorry because I don't know what the problem could be. And since no one else has verified if the tool works for them or not then I have no idea what to do. If I had the game then I could test things but I don't. And since you say that the GPD was untouched and I was unable to even open it and parse it then I'm stumped lol... And the case is not my GPD Tool if you're wondering, because I have a folder with around 100 untouched GPDs in it and they all open flawlessly...