void ZlibDecompressorImpl::chargeErrorStats(const int result) {
  switch (result) {
  case Z_ERRNO:
    stats_.zlib_errno_.inc();
    break;
  case Z_STREAM_ERROR:
    stats_.zlib_stream_error_.inc();
    break;
  case Z_DATA_ERROR:
    stats_.zlib_data_error_.inc();
    break;
  case Z_MEM_ERROR:
    stats_.zlib_mem_error_.inc();
    break;
  case Z_BUF_ERROR:
    stats_.zlib_buf_error_.inc();
    break;
  case Z_VERSION_ERROR:
    stats_.zlib_version_error_.inc();
    break;
  }
}
void ZlibDecompressorImpl::chargeErrorStats(const int result) {
  switch (result) {
  case Z_ERRNO:
    stats_.zlib_errno_.inc();
    break;
  case Z_STREAM_ERROR:
    stats_.zlib_stream_error_.inc();
    break;
  case Z_DATA_ERROR:
    stats_.zlib_data_error_.inc();
    break;
  case Z_MEM_ERROR:
    stats_.zlib_mem_error_.inc();
    break;
  case Z_BUF_ERROR:
    stats_.zlib_buf_error_.inc();
    break;
  case Z_VERSION_ERROR:
    stats_.zlib_version_error_.inc();
    break;
  }
}