Skip to content

Compression utility for 4kb - 64k JavaScript intros using DecompressionStream and Zopfli.

License

Notifications You must be signed in to change notification settings

mgnauck/js-payload-compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-payload-compress

Use this to compress your 4k/8k/64k javascript intro. Compresses an input javascript with zopfli deflate. Writes a html output file containing a minimal unpack script in the onload attribute of a svg element that uses a DecompressionStream to decompress and eval the input javascript.

Build:

cc js-payload-compress.c -std=c2x -Wall -Wextra -pedantic -lzopfli -o js-payload-compress

Based on (thanks!):

Uses:

Usage:

js-payload-compress [options] infile.js outfile.html

Options:
--zopfli-iterations=[number]: Number of zopfli iterations. More iterations take
  more time but can provide slightly better compression. Default is 50.
--no-blocksplitting: Do not use block splitting.
--no-compression: No compression (for testing).
--dump-compressed-raw: Dump compressed data to file raw (w/o unpack script).
  Attaches '.bin' to infile path for raw output.
--no-statistics: Do not show statistics.

About

Compression utility for 4kb - 64k JavaScript intros using DecompressionStream and Zopfli.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages