public Container writeRecords(CramHeader cramHeader, Collection<CramRecord> records, SequenceBaseProvider provider)
throws IOException, CramCompressionException {
List<Block> blocks = new ArrayList<Block>();
CramStats stats = new CramStats(cramHeader, null);
for (CramRecord record : records)
stats.addRecord(record);
CramRecordBlock crBlock = new CramRecordBlock();
stats.adjustBlock(crBlock);
crBlock.setSequenceName("20");
crBlock.setRecordCount(records.size());
ByteArrayOutputStream bhBAOS = new ByteArrayOutputStream();
CramRecordBlockWriter w = new CramRecordBlockWriter(bhBAOS);