Improve Gzip and Zip animation detection for File
and ContentProvider
animations in Compose
#2490
Labels
File
and ContentProvider
animations in Compose
#2490
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Is your feature request related to a problem? Please describe.
You have done great work, adding support for G-zipped animations, but this feature depends on file extension for content providers and file sources. This is good for most cases, but in some cases when dealing with data without extensions from external sources or pre-existing data where migration is hard, an alternative method may be needed.
Describe the solution you'd like
One solution that won't introduce breaking changes would be using
isGzipCompressed
andisZipCompressed
which are already present in the codebase and used byRawRes
andAsset
. I think it is a better and foolproof detection method but may need early file probing.Describe alternatives you've considered
Another method could be adding optional argument to each
LottieCompositionSpec
(exceptJsonString
of course), which allows users to explicitly specify the animation type.Additional context
Not applicable
The text was updated successfully, but these errors were encountered: