Package net.sf.cram.encoding

Examples of net.sf.cram.encoding.HuffmanIntegerEncoding.fromByteArray()


    System.out.println(Arrays.toString(values));
    System.out.println(Arrays.toString(lens));

    EncodingParams params = HuffmanIntegerEncoding.toParam(values, lens);
    HuffmanIntegerEncoding e = new HuffmanIntegerEncoding();
    e.fromByteArray(params.params);

    BitCodec<Integer> codec = e.buildCodec(null, null);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DefaultBitOutputStream bos = new DefaultBitOutputStream(baos);
View Full Code Here


          c.calculate();

          EncodingParams param = HuffmanIntegerEncoding.toParam(
              c.values(), c.bitLens());
          HuffmanIntegerEncoding he = new HuffmanIntegerEncoding();
          he.fromByteArray(param.params);
          EncodingLengthCalculator lc = new EncodingLengthCalculator(
              he);
          for (Integer value : dictionary.keySet())
            lc.add(value, dictionary.get(value).value);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.