mudcube / PNG-Storage

Encode + decode text into/from a PNG for compression, or weak cryptology.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a demo of using PNG to compress and decompress data to be used in Javascript. This demo is heavily inspired by Nihilogic, and is really just an update that includes javascript decompress, along with tweaking the compression to use all three RGB values instead of just luminance.

The library is easy to use, there are two functions;

PNGStorage.encode(data);

PNGStorage.decode(data, callback);

About

Encode + decode text into/from a PNG for compression, or weak cryptology.