Share My Creation SVG Packer

Hello,

Just wrote a small utility (for personal use) yesterday/today to test out an idea I had.

An SVG Packer with the focus on path based monochrome shapes.

Purpose:

creating smaller files from pre-optimized SVG files
fast in-memory depacking (unlike unzipping to SD and reading it back in)
'encrypt/encode' it which makes people not able to view the images without writing a custom depacker
(for example to prevent game cheating by peeking at all images (and their filenames) first)


Some results:

file1 original:3568 optimized:1382 original zipped:1645 -61.29%
file2 original:3160 optimized:1201 original zipped:1460 -62.03%
file3 original:3927 optimized:1509 original zipped:1789 -61.60%
file4 original:2826 optimized:1072 original zipped:1380 -62.10%
file5 original:3741 optimized:1417 original zipped:1714 -62.12%

I'm getting an average of around 62% smaller files and about 20% smaller than the zipped original.




in: original size
opt: optimized size in my own format
gain: percent gained compared to the original
raw: depacked raw svg output size from the optimized data format to verify that it still displays correctly. (even this is a bit smaller smaller)


The implementation of the depacker on B4A works fine and it's instant.
below is an example of a 2099 bytes (-59.59%) darth vader (was 5192 unpacked).
(yes, it's full width but the path is actually what's black)

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…