void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0: "nextFloorLabel=" + nextFloorLabel; do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; } else { nextFloorLabel = 256; } } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
nextFloorLabel = floorDataReader.readByte() & 0xff; if (targetLabel < nextFloorLabel) {
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
numFollowFloorBlocks = floorDataReader.readVInt(); assert numFollowFloorBlocks > 0; nextFloorLabel = floorDataReader.readByte() & 0xff;
byte b = in.readByte(); if (b >= 0) return b; long i = b & 0x7FL; b = in.readByte(); i |= (b & 0x7FL) << 7; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 14; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 21; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 28; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 35; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 42; if (b >= 0) return i; b = in.readByte(); i |= (b & 0x7FL) << 49; if (b >= 0) return i; b = in.readByte(); i |= (b & 0xFFL) << 56; return i;
private void readShortDeltas(ByteArrayDataInput in, short[] shorts, int count) { short k = 0; if (formatVersion < 1) { for (int i = 0; i < count; i++) { k = (short) (k + in.readByte()); shorts[i] = k; } } else { for (int i = 0; i < count; i++) { k = (short) (k + in.readVInt()); shorts[i] = k; } } }
private void readDeltas(ByteArrayDataInput in, int[] ints, int count) { int k = 0; if (formatVersion < 1) { for (int i = 0; i < count; i++) { k = k + in.readByte(); ints[i] = k; } } else { for (int i = 0; i < count; i++) { k = k + in.readVInt(); ints[i] = k; } } // System.out.println ("after readDeltas " + count + " pos=" + // bytes.position()); }
void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0: "nextFloorLabel=" + nextFloorLabel; do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; } else { nextFloorLabel = 256; } } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0: "nextFloorLabel=" + nextFloorLabel; do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; } else { nextFloorLabel = 256; } } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0: "nextFloorLabel=" + nextFloorLabel; do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; } else { nextFloorLabel = 256; } } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0; //if (DEBUG) System.out.println(" loadNextFoorBlock trans=" + transitions[transitionIndex]); do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; // if (DEBUG) System.out.println(" skip floor block2! nextFloorLabel=" + (char) nextFloorLabel + " vs target=" + (char) transitions[transitionIndex].getMin() + " newFP=" + fp + " numFollowFloorBlocks=" + numFollowFloorBlocks); if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; } else { nextFloorLabel = 256; } // if (DEBUG) System.out.println(" nextFloorLabel=" + (char) nextFloorLabel); } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
void loadNextFloorBlock() throws IOException { assert numFollowFloorBlocks > 0; //if (DEBUG) System.out.println(" loadNextFoorBlock trans=" + transitions[transitionIndex]); do { fp = fpOrig + (floorDataReader.readVLong() >>> 1); numFollowFloorBlocks--; // if (DEBUG) System.out.println(" skip floor block2! nextFloorLabel=" + (char) nextFloorLabel + " vs target=" + (char) transitions[transitionIndex].getMin() + " newFP=" + fp + " numFollowFloorBlocks=" + numFollowFloorBlocks); if (numFollowFloorBlocks != 0) { nextFloorLabel = floorDataReader.readByte() & 0xff; termOrd += floorDataReader.readVLong(); } else { nextFloorLabel = 256; } // if (DEBUG) System.out.println(" nextFloorLabel=" + (char) nextFloorLabel); } while (numFollowFloorBlocks != 0 && nextFloorLabel <= transition.min); load(null); }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }
public void setFloorData(ByteArrayDataInput in, BytesRef source) { final int numBytes = source.length - (in.getPosition() - source.offset); assert numBytes > 0; if (numBytes > floorData.length) { floorData = new byte[ArrayUtil.oversize(numBytes, 1)]; } System.arraycopy(source.bytes, source.offset+in.getPosition(), floorData, 0, numBytes); floorDataReader.reset(floorData, 0, numBytes); numFollowFloorBlocks = floorDataReader.readVInt(); nextFloorLabel = floorDataReader.readByte() & 0xff; nextFloorTermOrd = termOrdOrig + floorDataReader.readVLong(); // System.out.println(" setFloorData ord=" + ord + " nextFloorTermOrd=" + nextFloorTermOrd + " shift=" + (nextFloorTermOrd-termOrdOrig)); //if (DEBUG) { //System.out.println(" setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel)); //} }