)]}'
{
  "commit": "eb998564190df979b975e8b9c6a441554276a17a",
  "tree": "03384a8a7996fa448641e15fceed3f06d899b7a4",
  "parents": [
    "5868b2023771228e24cddc490d6fa32ed82f62d7"
  ],
  "author": {
    "name": "A Googler",
    "email": "no-reply@google.com",
    "time": "Tue Oct 14 13:50:00 2025 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 14 13:50:42 2025 -0700"
  },
  "message": "Prevent OOM caused by loading large files into memory.\n\nPreviously when building Android APK zip archives, the source files are read entirely into memory as byte arrays. So it cannot support files larger than 2 GB and will crash with OOM when allocating the arrays.\n\nThe change adds the support for an arbitrary InputStream of unknown size which will work for large files.\n\nTo minimize the impact to the build speed, when a file is small enough, the whole file is still read into memory to avoid repeated disk I/O. Large files are read in a streaming fashion to limit their memory consumption at the cost of more disk I/O.\n\nCurrently the boundary between small and large size is set to 512 MB empirically. The Java byte arrays can support up to 2 GB, but loading such large files into memory can also cause a high memory pressure for the JVM, so I didn\u0027t set it to 2 GB.\n\nPiperOrigin-RevId: 819382752\nChange-Id: Id0b96172e1674b4a3556a61538c957fa599c5c79\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "85528c63a26e8a6e9b6b4fe463aeb1ba37498a67",
      "old_mode": 33188,
      "old_path": "src/tools/java/com/google/devtools/build/android/AndroidResourceOutputs.java",
      "new_id": "f2bfb83fc5aced93fec6301c67d9eb79922654ae",
      "new_mode": 33188,
      "new_path": "src/tools/java/com/google/devtools/build/android/AndroidResourceOutputs.java"
    },
    {
      "type": "modify",
      "old_id": "89f3b7a8197e935b51f0e4f04438d160bd7cbd51",
      "old_mode": 33188,
      "old_path": "src/tools/java/com/google/devtools/build/android/ResourcesZip.java",
      "new_id": "cd3410abaa4da5877c3c76ffd338ea5fe4da1ff2",
      "new_mode": 33188,
      "new_path": "src/tools/java/com/google/devtools/build/android/ResourcesZip.java"
    },
    {
      "type": "modify",
      "old_id": "21f6721544e1fa5aa9fc9d9221b31ce134cbd5b4",
      "old_mode": 33188,
      "old_path": "src/tools/javatests/com/google/devtools/build/android/AndroidResourceOutputsTest.java",
      "new_id": "a4b7066a82156328eda7693a91369b4042e6ba6b",
      "new_mode": 33188,
      "new_path": "src/tools/javatests/com/google/devtools/build/android/AndroidResourceOutputsTest.java"
    }
  ]
}
