Examples of BitInputStream


Examples of org.terrier.compression.BitInputStream

  BitPostingIndexInputStream(String _filename, byte _fileCount,
      Iterator<? extends BitIndexPointer> _pointerList,
      Class<? extends IterablePosting> _postingIteratorClass, int _fieldCount) throws IOException
  {
    fileCount = 0;
    file = new BitInputStream(_filename);
    //file = new org.terrier.compression.BitFileBuffered(_filename).readReset(0l, (byte)0);
    if (DEBUG)
      file = new DebuggingBitIn(file);
    pointerList = _pointerList;
    postingIteratorClass = _postingIteratorClass;
View Full Code Here

Examples of org.terrier.compression.BitInputStream

  {
    this.index = _index;
    this.doi = _index.getDocumentIndex();
    this.structureName = _structureName;
    fileCount = Byte.parseByte(_index.getIndexProperty("index."+structureName+".data-files", "1"));
    file = new BitInputStream(getFilename(_index, structureName, fileCount, (byte)0));
    if (DEBUG)
      file = new DebuggingBitIn(file);
    pointerList = _pointerList;
    postingIteratorClass = _postingIteratorClass;
    fieldCount = _index.getIntIndexProperty("index."+structureName+".fields.count", currentFile = 0);
View Full Code Here

Examples of org.terrier.compression.BitInputStream

    //check to see if file id has changed
    if (pointer.getFileNumber() > currentFile)
    {
      //file id changed: close current file, open specified file
      file.close();
      file = new BitInputStream(getFilename(index, structureName, fileCount, currentFile = pointer.getFileNumber()));
      if (DEBUG)
        file = new DebuggingBitIn(file);
    }
    if (file.getByteOffset() != pointer.getOffset())
    {
View Full Code Here

Examples of org.terrier.compression.BitInputStream

  {
    List<Posting> postings = new ArrayList<Posting>();
    postings.add(new BasicPostingImpl(1,1));
    List<BitIndexPointer> pointerList = new ArrayList<BitIndexPointer>();
    String filename = PostingTestUtils.writePostingsToFile(new Iterator[]{postings.iterator()}, pointerList);
    BitInputStream bitIn = new BitInputStream(filename);
    IterablePosting ip = new BasicIterablePosting(bitIn, postings.size(), null);
    PostingTestUtils.comparePostings(postings, ip);
  }
View Full Code Here

Examples of org.terrier.compression.BitInputStream

    postings.add(new BasicPostingImpl(2,1));
    postings.add(new BasicPostingImpl(10,1));
    postings.add(new BasicPostingImpl(100,1));
    List<BitIndexPointer> pointerList = new ArrayList<BitIndexPointer>();
    String filename = PostingTestUtils.writePostingsToFile(new Iterator[]{postings.iterator()}, pointerList);
    BitInputStream bitIn = new BitInputStream(filename);
    IterablePosting ip = new BasicIterablePosting(bitIn, postings.size(), null);
    PostingTestUtils.comparePostings(postings, ip);
  }
View Full Code Here

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

      Block block = c.blocks[b++];
      if (block.contentType != ContentType.CORE.getContentType())
        throw new RuntimeException("Wrong content type: " + block.contentType);
      if (block.contentId != 0)
        throw new RuntimeException("Wrong content id: " + block.contentId);
      BitInputStream bis = new DefaultBitInputStream(new ByteArrayInputStream(block.data));

      HashMap<Integer, DataInputStream> isMap = new HashMap<Integer, DataInputStream>();
      for (short code : tagCodes)
        isMap.put((int) code, new DataInputStream(new ByteArrayInputStream(c.blocks[b++].data)));
      isMap.put(0xff & ContentType.QUAL.getContentType(), new DataInputStream(new ByteArrayInputStream(c.blocks[b++].data)));
View Full Code Here

Examples of vavi.io.BitInputStream

     * @param byteOrder {@link #read()} ���̃o�C�g�I�[�_
     * @param bits {@link BitOutputStream} �̃T�C�Y
     * @param bitOrder {@link BitOutputStream} �̃o�C�g�I�[�_
     */
    public AdpcmInputStream(InputStream in, ByteOrder byteOrder, int bits, ByteOrder bitOrder) {
        super(new BitInputStream(in, bits, bitOrder));
        this.byteOrder = byteOrder;
        this.decoder = getCodec();
//Debug.println(this.in);
    }
View Full Code Here

Examples of xbird.util.io.BitInputStream

            int firstException = dis.readInt();
            int len = dis.readInt();
            byte[] b = new byte[len];
            dis.readFully(b, 0, len);
            FastByteArrayInputStream codesIs = new FastByteArrayInputStream(b);
            BitInputStream codesBis = new BitInputStream(codesIs);
            int[] codes = new int[totalEntries];
            unpack(codesBis, bitwidth, codes, totalEntries);
            int exceptions = dis.readShort();
            CharArrayList exceptionList = new CharArrayList(exceptions);
            for(int i = 0; i < exceptions; i++) {
View Full Code Here

Examples of xbird.util.io.BitInputStream

        return ret;
    }

    public static long decodeGolombL(final InputStream in, final long m, final int logm)
            throws IOException {
        final BitInputStream bis = new BitInputStream(in);

        long unary = 0;
        while(!bis.readBit()) {// loop until '1' is found
            unary++;
        }

        /* Get the first q bits (we may need (q+1) actually) */
        long remainder = BitUtils.getLongBits(bis, logm);
View Full Code Here

Examples of xbird.util.io.BitInputStream

            int firstException = dis.readInt();
            int len = dis.readInt();
            byte[] b = new byte[len];
            dis.readFully(b, 0, len);
            FastByteArrayInputStream codesIs = new FastByteArrayInputStream(b);
            BitInputStream codesBis = new BitInputStream(codesIs);
            int[] codes = new int[totalEntries];
            unpack(codesBis, bitwidth, codes, totalEntries);
            int exceptions = dis.readShort();
            CharArrayList exceptionList = new CharArrayList(exceptions);
            for(int i = 0; i < exceptions; i++) {
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.