public static LottieTask<LottieComposition> fromInputStream(@Nullable Context context, InputStream inputStream, @Nullable String cacheKey) {
    // Prevent accidentally leaking an Activity.
    final Context appContext = context == null ? null : context.getApplicationContext();
    return cache(cacheKey, () -> fromInputStreamSync(appContext, inputStream, cacheKey), null);
  }
Use this when you have an input stream but aren't sure if it is a json, zip, or gzip file.
This will read the file headers to see if it starts with the gzip or zip magic bytes.
@param context is optional and only needed if your zip file contains ttf or otf fonts. If yours doesn't, you may pass null.
               Embedded fonts may be .ttf or .otf files, can be in subdirectories, but must have the same name as the
               font family (fFamily) in your animation file.
lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java