# Class CramComparison

java.lang.Object
htsjdk.samtools.cram.CramComparison

public class CramComparison extends Object
Command-line tool for comparing two SAM/BAM/CRAM files record-by-record. Handles known CRAM/SAM differences (auto-generated MD/NM, unsigned B-array types) and reports mismatches with clear field-level detail.

Exit codes: 0 = comparison completed (match or mismatch), 2 = error.

## Constructor Summary

Constructors
Constructor
Description
`CramComparison()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`main(String[] args)`
`static int`
`run(String[] args)`
Run the comparison and return the exit code (0=match, 1=mismatch, 2=error).

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CramComparison

public CramComparison()

## Method Details

### main

public static void main(String[] args)

### run

public static int run(String[] args)
Run the comparison and return the exit code (0=match, 1=mismatch, 2=error). Separated from main() for testability.