Open tbm98 opened 1 year ago
I would also like to hear about this. Dot lottie files are much smaller in size, one of the reasons we're using lottie in the first place.
@canturkay you can already compress a json file to a zip file and AFAIK it will have the same size saving as dotlottie. Unless I'm misunderstanding something, his is already supported.
@canturkay you can already compress a json file to a zip file and AFAIK it will have the same size saving as dotlottie. Unless I'm misunderstanding something, his is already supported.
Does support added for .lottie???
@canturkay you can already compress a json file to a zip file and AFAIK it will have the same size saving as dotlottie. Unless I'm misunderstanding something, his is already supported.
Does support added for .lottie???
As mentioned by @xvrh , you can just zip the .json file and use it as .zip. It should have the same size as .lottie.
So instead of using .lottie file, convert it to .json format, and then zip it.
@canturkay you can already compress a json file to a zip file and AFAIK it will have the same size saving as dotlottie. Unless I'm misunderstanding something, his is already supported.
Does support added for .lottie???
As mentioned by @xvrh , you can just zip the .json file and use it as .zip. It should have the same size as .lottie.
So instead of using .lottie file, convert it to .json format, and then zip it.
One more question, loading from .json vs .zip, What about performance perspective? Does .zip costier as it needs to Unzip, then animate?
@canturkay you can already compress a json file to a zip file and AFAIK it will have the same size saving as dotlottie. Unless I'm misunderstanding something, his is already supported.
Does support added for .lottie???
As mentioned by @xvrh , you can just zip the .json file and use it as .zip. It should have the same size as .lottie. So instead of using .lottie file, convert it to .json format, and then zip it.
One more question, loading from .json vs .zip, What about performance perspective? Does .zip costier as it needs to Unzip, then animate?
I don't know technically how it works, but I wold assume it would be more costly. However, I see no issues on my app although I have like 10 decent animations on a single page.
@canturkay What is your use case for compressing the animation in .zip?
On Android the .apk are themself compressed archive. Link On iOS, an .ipa is a compressed archive Link On the web, you can turn-on gzip on your server for the .json responses.
I'm trying to understand where it makes a difference to have it compressed?
There is a document called "numbers every programmer should know", from that document you can learn that unzipping a file is cheaper than downloading the file from the internet (which is why web servers enable gzip compression by default).
In the case of having the file locally, it depends on the file system. NTFS uses 4kb clusters by default, but exFAT uses 128kb clusters, so having a 200 byte vs a 128kb file makes no difference because the operating system reads/writes the whole cluster anyway (this is the reason why copying a lot of small files is slow, but compressing the folder and copying the zip is fast).
Anyway, I'm not here to talk about "numbers that every programmer should know", but to ask whether adding support for dotLottie files is planned, because dotLottie includes features like state machines to switch between animations and its not just "a zipped json":
@AldoMX can you list precisely the features from dotLottie that you would like?
Smaller size was listed above and I answered that this is already supported (although I don't really see the value myself).
Can you provide some representative dotLottie examples? What changes to the API would be necessary to make use of it?
There are only 3 features for now:
Is this support open .lottie file?