}
public static CramRecordCodec buildCodec(CramHeader cramHeader, CramRecordBlock crBlock,
SequenceBaseProvider provider) throws CramCompressionException {
RecordCodecFactory rcf = new RecordCodecFactory();
DefaultMutableTreeNode rootNode = rcf.buildCodecTree(cramHeader, crBlock, provider);
uk.ac.ebi.ena.sra.cram.encoding.MeasuringCodec mCodec = (MeasuringCodec) rootNode.getUserObject();
uk.ac.ebi.ena.sra.cram.encoding.CramRecordCodec crCodec = (uk.ac.ebi.ena.sra.cram.encoding.CramRecordCodec) mCodec
.getDelegate();
CramRecordCodec codec = new CramRecordCodec();
codec.baseCodec = crCodec.baseCodec;