J2ME GAME development notes - compression or non-compression

xiaoxiao2021-03-06  55

Do J2ME knows that the capacity of MIDlet Suite is too small, so I don't want to do point compression. A few days ago, I tried a compression. I have 3 layers of data in my own defined map file, of which 2, 3 layers have the same value of large sequential continuous distribution. Ugh? I wondered, using a simple travel code compressed, only the value of this value, the algorithm is very simple and not slow, but it can greatly reduce the size of the map file. It seems really good! If you don't have to dry, you will be busy for half a day, change the map editor, and change the code to read the map in the game. I finally got it, I tried it, the original 2.23K file was compressed to more than 900 bytes. It seems very good, then I played a JAR package, but suddenly found that this JAR file seems to be more than the original little! It seems to be bigger. I quickly found the code of the backup, and I really did the original JAR smaller! what's up? ? I suddenly thought that JAR itself is compressed format. Is it. . . I quickly opened two JAR files in WinRAR. ~~~~~ It turns out this! In the original JAR, the 2.23k file package size is 185 bytes, and my current JAR, the size of the 900-multi-byte file is 216 bytes. In other words, I should not compress the file after packing the file!

It seems that you should first look at the size you want to compress in the size of the file you want to compress. There is also a PNG file, and after using some tools, the size of the bag has become bigger. This is really important to pay attention to it ~!

转载请注明原文地址:https://www.9cbs.com/read-112872.html

New Post(0)