diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java b/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java index 57b723c95c..dd4a6d0a15 100644 --- a/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java +++ b/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java @@ -639,7 +639,8 @@ private static LottieResult fromZipStreamSyncInternal(@Nullab File tempFile = new File(context.getCacheDir(), fileName); try (FileOutputStream fos = new FileOutputStream(tempFile)) { try (OutputStream output = new FileOutputStream(tempFile)) { - byte[] buffer = new byte[4 * 1024]; + int four_kb_size = 4 * 1024; + byte[] buffer = new byte[four_kb_size]; int read; while ((read = inputStream.read(buffer)) != -1) { output.write(buffer, 0, read);