- Messages
- 5
- Country
Hey there,
I'm developing this tool to extract land class info from worldlc.bgl. It is available currently in https://github.com/rafaeldamasceno/BGLConverter.
However, some TRQ1 records have LZ1 compression, for which the wiki only provides some pseudocode algorithm.
I've tried implementing it in C# but I don't seem to be having great success. Currently it is trying to output to an out of bounds index, which I assume is because I'm reading the bits in a bad order. I've tried messing with the endianness of the bits and input bytes, but I don't seem to find the right one.
I also assume I'll have trouble with the double compression ones, since they all seem to require an output size and I have no idea how to calculate the intermediate value.
Any help is appreciated. Thank you!
I'm developing this tool to extract land class info from worldlc.bgl. It is available currently in https://github.com/rafaeldamasceno/BGLConverter.
However, some TRQ1 records have LZ1 compression, for which the wiki only provides some pseudocode algorithm.
I've tried implementing it in C# but I don't seem to be having great success. Currently it is trying to output to an out of bounds index, which I assume is because I'm reading the bits in a bad order. I've tried messing with the endianness of the bits and input bytes, but I don't seem to find the right one.
I also assume I'll have trouble with the double compression ones, since they all seem to require an output size and I have no idea how to calculate the intermediate value.
Any help is appreciated. Thank you!
Last edited: