hrgdavor / jscadui

MIT License
30 stars 7 forks source link

support gzip in data: uri #76

Closed hrgdavor closed 7 months ago

hrgdavor commented 7 months ago

as discussed here https://github.com/jscad/OpenJSCAD.org/issues/1318#issuecomment-1896245210

it would be nice if jscad.app would unzip the script when mime type is application/gzip

I just took a script from jscad examples (gears)

content size bytes size bytes urlencoded
script raw 5.320 7.906
base64 7.096 7.104
gzip&base64 2.344 2.486

I was surprised to see urlencoding original script (7.9) is more overhead than base64 and then urlencode (7.1 k)

unless I miscalculated sth, gzip+b64 looks worth it