@Override public long longValue() throws IOException { return slice.readByte(doc); } };
@Override public long get(long index) { try { return in.readByte(offset + index) & 0xFF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { int shift = (int) ((index + 1) & 1) << 2; return (in.readByte(offset + (index >>> 1)) >>> shift) & 0xF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { int shift = 7 - (int) (index & 7); return (in.readByte(offset + (index >>> 3)) >>> shift) & 0x1; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { int shift = (3 - (int)(index & 3)) << 1; return (in.readByte(offset + (index >>> 2)) >>> shift) & 0x3; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long longValue() throws IOException { return slice.readByte(disi.index()); } };
public long get(long index) { final long block = index >>> shift; if (this.block != block) { assert block > this.block : "Reading backwards is illegal: " + this.block + " < " + block; int bitsPerValue; do { offset = blockEndOffset; try { bitsPerValue = slice.readByte(offset++); delta = slice.readLong(offset); offset += Long.BYTES; if (bitsPerValue == 0) { blockEndOffset = offset; } else { final int length = slice.readInt(offset); offset += Integer.BYTES; blockEndOffset = offset + length; } } catch (IOException e) { throw new RuntimeException(e); } this.block ++; } while (this.block != block); values = bitsPerValue == 0 ? LongValues.ZEROES : DirectReader.getInstance(slice, bitsPerValue, offset); } return mul * values.get(index & mask) + delta; } };
@Override public long longValue() throws IOException { final int block = doc >>> shift; if (this.block != block) { int bitsPerValue; do { offset = blockEndOffset; bitsPerValue = slice.readByte(offset++); delta = slice.readLong(offset); offset += Long.BYTES; if (bitsPerValue == 0) { blockEndOffset = offset; } else { final int length = slice.readInt(offset); offset += Integer.BYTES; blockEndOffset = offset + length; } this.block ++; } while (this.block != block); values = bitsPerValue == 0 ? LongValues.ZEROES : DirectReader.getInstance(slice, bitsPerValue, offset); } return mul * values.get(doc & mask) + delta; } };
@Override public long longValue() throws IOException { final int index = disi.index(); final int block = index >>> shift; if (this.block != block) { int bitsPerValue; do { offset = blockEndOffset; bitsPerValue = slice.readByte(offset++); delta = slice.readLong(offset); offset += Long.BYTES; if (bitsPerValue == 0) { blockEndOffset = offset; } else { final int length = slice.readInt(offset); offset += Integer.BYTES; blockEndOffset = offset + length; } this.block ++; } while (this.block != block); values = bitsPerValue == 0 ? LongValues.ZEROES : DirectReader.getInstance(slice, bitsPerValue, offset); } return mul * values.get(index & mask) + delta; } };
@Override public long longValue() throws IOException { return slice.readByte(docID); } };
@Override public long longValue() throws IOException { return slice.readByte(doc); } };
@Override public long get(long index) { try { return in.readByte(offset + index) & 0xFF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(int docID) { try { return slice.readByte(docID); } catch (IOException e) { throw new RuntimeException(e); } } };
@Override public long get(long index) { try { int shift = (3 - (int)(index & 3)) << 1; return (in.readByte(offset + (index >>> 2)) >>> shift) & 0x3; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { return in.readByte(offset + index) & 0xFF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { int shift = (int) ((index + 1) & 1) << 2; return (in.readByte(offset + (index >>> 1)) >>> shift) & 0xF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public boolean get(int index) { try { return (in.readByte(index >> 3) & (1 << (index & 7))) != 0; } catch (IOException e) { throw new RuntimeException(e); } }
@Override public long get(long index) { try { int shift = 7 - (int) (index & 7); return (in.readByte(offset + (index >>> 3)) >>> shift) & 0x1; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long get(long index) { try { return in.readByte(offset + index) & 0xFF; } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public long longValue() throws IOException { return slice.readByte(disi.index()); } };