Telegram Group & Telegram Channel
Forwarded from SVG Animated Stickers
1) reduced to 1 digit after decimal 215kB 18% less
2) reduced to 3 digits after decimal 261kB
3) reduced to 2 digits after decimal 238kB 9% less

d="M -240.983,-89.522 C -236.461,-123.662 -225.153,-185.011 -176.132,-211.054 -109.389,-246.511 -10.685,

d="M -240.9,-89.5 C -236.4,-123.6 -225.1,-185.0 -176.1,-211.0 -109.3,-246.5 -10.6,

1st shows a SVG partial path of 3 digits after decimal. 2nd one 1 digit.

save a bash script called optimize.sh with the following:
sed -i -E -e 's|([0-9]+\.[0-9]{1})[0-9]+|\1|g' "$1"

now run find command and recursively find all svg files
find . -name \*.svg -exec ./optimize.sh {} \;

ran it on 17,354 svg files and savings is 800MB. 5GB --> 4.2GB. Sure if did only 2 then 400MB but the glitch as far as I could tell happens less than 0.1% of the time. Not all stickers convert from tgs so it's definitely worth 0.1% stickers getting glitched. Only found glitch on on other sticker. Already reduced to 1 digit for SVG Stroker.



tg-me.com/geektips/868
Create:
Last Update:

1) reduced to 1 digit after decimal 215kB 18% less
2) reduced to 3 digits after decimal 261kB
3) reduced to 2 digits after decimal 238kB 9% less

d="M -240.983,-89.522 C -236.461,-123.662 -225.153,-185.011 -176.132,-211.054 -109.389,-246.511 -10.685,

d="M -240.9,-89.5 C -236.4,-123.6 -225.1,-185.0 -176.1,-211.0 -109.3,-246.5 -10.6,

1st shows a SVG partial path of 3 digits after decimal. 2nd one 1 digit.

save a bash script called optimize.sh with the following:
sed -i -E -e 's|([0-9]+\.[0-9]{1})[0-9]+|\1|g' "$1"

now run find command and recursively find all svg files
find . -name \*.svg -exec ./optimize.sh {} \;

ran it on 17,354 svg files and savings is 800MB. 5GB --> 4.2GB. Sure if did only 2 then 400MB but the glitch as far as I could tell happens less than 0.1% of the time. Not all stickers convert from tgs so it's definitely worth 0.1% stickers getting glitched. Only found glitch on on other sticker. Already reduced to 1 digit for SVG Stroker.

BY GeekTips






Share with your friend now:
tg-me.com/geektips/868

View MORE
Open in Telegram


GeekTips Telegram | DID YOU KNOW?

Date: |

Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.

Why Telegram?

Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.

GeekTips from ye


Telegram GeekTips
FROM USA