code: static void validateChecksum(int expectedChecksum, ByteBuf data, int offset, int length) {
          final int actualChecksum = calculateChecksum(data, offset, length);
          if (actualChecksum != expectedChecksum) {
              throw new DecompressionException(
                      "mismatching checksum: " + Integer.toHexString(actualChecksum) +
                              " (expected: " + Integer.toHexString(expectedChecksum) + ')');
          }
      }
docs: Computes the CRC32C checksum of the supplied data, performs the "mask" operation
  on the computed checksum, and then compares the resulting masked checksum to the
  supplied checksum.
  
  @param expectedChecksum The checksum decoded from the stream to compare against
  @param data The input data to calculate the CRC32C checksum of
  @throws DecompressionException If the calculated and supplied checksums do not match