Skip to content

Try every possible ordering of SVG element attributes to see which one compresses the best with Brotli

License

Notifications You must be signed in to change notification settings

anthonyryan1/svg-exhaustive-attribute-order-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SVG Exhaustive Attribute Order Optimizer

SVGO already takes care of transformations that can reduce the byte size of the .svg file.

This repository, however, focuses on the relationship between the already-optimized SVG and the compression layer. In our case, Brotli because it has a large pre-shared dictionary that helps compress SVGs.

Rather than having a clever algorithm, this repository exhaustively checks all possible parameter order combinations and checks the compressed size of each one, which makes it a bad fit for SVGs with many attributes.

This program is slow, and runtime grows exponentially with SVG complexity. It saves only a handful of bytes per file.

But I've already built it, so you can partake in the madness without building it yourself.

About

Try every possible ordering of SVG element attributes to see which one compresses the best with Brotli

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages