In now this kind of project more and more big, JS file more and more complex premise, compression js file became inevitable trend, so now many projects in the line before the JS file will be compressed into gzjs before going online.
Before downloading a project to learn, inside the use of GZJS compression, in order to view the source code is also racked his brains. Later on the internet to see a lot of information later only to know, GZJS is through the gzip algorithm, the original JS file compression, compression rate is quite considerable, the disadvantage of nature is not convenient to learn.
A xxx.js file has been compressed into xxx.gz after gzip compression. JS, this inconvenient background processing, so the suffix is changed to GZJS, the format of the file used by conventional means can not be opened, only by reverse decoding and then regenerate a file, that is, to obtain a Xxx.gzjs file, first converted to byte[] type, and then using the GZIP algorithm to decode, then re-export a xxx.js file so that it will open normally.
A few months of this idea I wrote a class to convert, later thought, or too complex, simply wrote a Java tool for conversion, you can compress all the gzjs files in the output folder, and then output to the specified folder, and keep the directory structure.
This blog post is to promote my gadgets, and by the way, to help people who need to link to the CSDN download page (resources are free).
The link address is attached below:
How to open gzjs files