PNG Based File Compression in .NET
-
Today I wrote a file compressor in Visual Basic, which stores its data in PNG images. It's called Squash. Squash works by throttling the bytes of a file into a PNG image, storing 3 bytes per pixel in the Red, Green & Blue components. It works in a similar way to a ZIP file, but there is no extraction and apart from the extension (e.g. Document.docx.squash), the format is data/file type agnostic. Files with consistent byte patterns or 'blank' regions compress very well with Squash because these form solid or consistent areas in the graphic. Here are the results - Results Graphic[^] Squish is a free, single-executable file compressor. Just drag files on to Squash and find a .squash file in the same folder. Squash is great for instant messaging, and can greatly improve transfer times. If your contacts have Squash too, they can just open the received file and it gets decompressed on the fly. Just drop the EXE anywhere on your computer and start saving space - and time. Project Page on my Site[^] Download (EXE, 330k) Source (ZIP, 150k) If you go to the 'Project page on my Site' link, you can find the source and big explanation of how it works. The explanation is targeted towards beginners.