/* Compute the number of bytes required to write a package length. */
UINT8 EFIAPI AmlComputePkgLengthWidth(IN UINT32 Length)
/* Compute the number of bytes required to write a package length. */
UINT8 EFIAPI AmlComputePkgLengthWidth(IN UINT32 Length)
{
  if (Length >= (1 << 28)) {
    ASSERT (0);
    return 0;
  } else if (Length >= (1 << 20)) {
    return 4;
  } else if (Length >= (1 << 12)) {
    return 3;
  } else if (Length >= (1 << 6)) {
    return 2;
  }
  return 1;
}