Common Word String Compression Library
A compression library for strings, that recognizes common words, and creates references to them
A compression library for strings, that recognizes common words, and creates references to them. Because these word references are built within the cdn, they should get cached and reduce the amount of data sent to the client.
This algorithm checks if the string got smaller or larger at each step, and does Not add methods that become larger than the original result from the last method. The algorithm attempts to reduce repeating words, and generate utf8 character based references to allow fast decompression.
Usually decompression is faster than compression, as compression should make the string as small as possible, and decompression is usually when you actually need the string.
npm install @aspiesoft/cwsclib # or with no optional dependencies npm install @aspiesoft/cwsclib --no-optional
<!-- Optional: add secondary compression (will detect automatically) --> <script src="https://email@example.com/dist/pako.min.js" charset="utf-8"></script> <!-- Note: charset="utf-8" is necessary for the script to use utf-8 character references properly --> <script src="https://cdn.jsdelivr.net/gh/AspieSoft/cwscLib@1/script.min.js" charset="utf-8"></script>