Package uk.ac.ebi.ena.sra.cram.io

Examples of uk.ac.ebi.ena.sra.cram.io.BitOutputStream


    codec.osMap = osMap;

    int counter = 0;

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    BitOutputStream bos = new DefaultBitOutputStream(baos);

    Iterator<CramRecord> iterator = records.iterator();
    long time1 = System.nanoTime();
    while (iterator.hasNext()) {

      for (int i = 0; i < recordsPerSlice; i++) {
        if (!iterator.hasNext())
          break;
        CramRecord record = iterator.next();
        codec.write(bos, record);
        counter++;
      }

      bos.close();
      block = new Block();
      block.contentType = ContentType.CORE.getContentType();
      block.contentId = 0;
      block.data = baos.toByteArray();
      block.method = CompressionMethod.GZIP.byteValue();
View Full Code Here

TOP

Related Classes of uk.ac.ebi.ena.sra.cram.io.BitOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.