Closed gynt closed 5 years ago
A map file can be divided into sections that start with an integer that indicates its size, followed by a byte array of that size.
However, at the end of some sections, there is no indication of the size of the next section. We need that size specification because its size seems to differ across map files. For an example, see this line: https://github.com/sourcehold/sourcehold-maps/blob/master/map_structure.h#L100
I found the solution. There is a meta section that indicates all the sizes of the sections. It also indicates whether it is compressed or not.
I implemented an unpacker
A map file can be divided into sections that start with an integer that indicates its size, followed by a byte array of that size.
However, at the end of some sections, there is no indication of the size of the next section. We need that size specification because its size seems to differ across map files. For an example, see this line: https://github.com/sourcehold/sourcehold-maps/blob/master/map_structure.h#L100