Skip to content

in4k/js-payload-compress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-payload-compress

Compress input javascript with zopfli deflate. Write html outfile with small unpack script in onload of svg element that uses DecompressionStream to uncompress and eval the input javascript.

Build with:

gcc -lz -lzopfli -std=c17 -Wall -Wextra -pedantic -o js-payload-compress js-payload-compress.c

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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%