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/867
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/867

View MORE
Open in Telegram


GeekTips Telegram | DID YOU KNOW?

Date: |

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

GeekTips from hk


Telegram GeekTips
FROM USA