)]}'
{
  "commit": "e75a26a7b0ea606a28840e0fa17809ff912e531a",
  "tree": "cfd7b8acd166ac18cd367014c887dd2b5f0d5611",
  "parents": [
    "869dae002e5efb372a0b09cd7d99390ca2089cc1"
  ],
  "author": {
    "name": "Sami Tabet",
    "email": "24794538+sfluor@users.noreply.github.com",
    "time": "Wed Jun 26 13:11:13 2024"
  },
  "committer": {
    "name": "Sami Tabet",
    "email": "sami.tabet@datadoghq.com",
    "time": "Wed Jun 26 13:12:27 2024"
  },
  "message": "Update upperBound ratio when guessing the required decompression buffer size\n\nWe noticed that for one of our services we sometimes have a lot of allocations caused by the `ioutil.ReadAll` call in the `Decompress` method.\n\nAfter investigation those are coming from buffers whose decompressed size is greater than 10x the input size. This is quite wasteful because it means that we allocate twice for those buffers.\n\nOnce in this branch: https://github.com/DataDog/zstd/blob/869dae002e5efb372a0b09cd7d99390ca2089cc1/zstd.go#L143\n\nAnd another time here once we realise that the buffer we previously allocated wasn\u0027t big enough: https://github.com/DataDog/zstd/blob/869dae002e5efb372a0b09cd7d99390ca2089cc1/zstd.go#L154\n\nThis technically doesn\u0027t fully solve the problem but it should now happen less often. I can also make this upper bound configurable if this change sounds too scary\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b0be540f8ac842f4ed7b98dfe33fe65ce0098a8f",
      "old_mode": 33188,
      "old_path": "zstd.go",
      "new_id": "8499bf108b9ca60254fa2332690b82edb07615d0",
      "new_mode": 33188,
      "new_path": "zstd.go"
    }
  ]
}
