|
|
|
|
|
by adamcanady
4228 days ago
|
|
Wow. I can make sense of a little bit of the original source, but I wonder more how RegPack [0] works to compress it into that final submission! As a side note: I'm in college now and looking to propose an independent study on compression. Any suggested readings or algorithms I should look into? [0] https://github.com/Siorki/RegPack |
|
Lossy compression (which RegPack is actually an example of), typically involves lossless compression plus a preprocessing step to discard information so that the lossless compressor can do a better job.
The techniques for discarding information vary based on application. For images and audio, the most successful techniques tend to involve working in frequency space, so you'll want to read up on the FFT and related transforms.
For code compression, you have different constraints when discarding information because you have to produce a program with identical output to the original. Simple techniques involve removing comments and renaming variables to have shorter names. More advanced techniques involve more complex transformations of the AST, including language-specific tricks like wrapping javascript in a "with(Math){}" block.
Hope some of that helps.