byte compressionId = buffer.get(); if (CompressionFactory.hasEncodingFlag(compressionId)) { encoding = CompressionFactory.LongEncodingFormat.forId(buffer.get()); compressionId = CompressionFactory.clearEncodingFlag(compressionId);
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.TABLE.getId()); metaOut.put(CompressionFactory.TABLE_ENCODING_VERSION); metaOut.putInt(table.size()); for (int i = 0; i < valueAddedInOrder.size(); i++) { metaOut.putLong(valueAddedInOrder.getLong(i)); } }
byte compressionId = buffer.get(); if (CompressionFactory.hasEncodingFlag(compressionId)) { encoding = CompressionFactory.LongEncodingFormat.forId(buffer.get()); compressionId = CompressionFactory.clearEncodingFlag(compressionId);
public static Supplier<ColumnarLongs> getLongSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder order, LongEncodingFormat encodingFormat, CompressionStrategy strategy ) { if (strategy == CompressionStrategy.NONE) { return new EntireLayoutColumnarLongsSupplier(totalSize, encodingFormat.getReader(fromBuffer, order)); } else { return new BlockLayoutColumnarLongsSupplier( totalSize, sizePer, fromBuffer, order, encodingFormat.getReader(fromBuffer, order), strategy ); } }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.TABLE.getId()); metaOut.put(CompressionFactory.TABLE_ENCODING_VERSION); metaOut.putInt(table.size()); for (int i = 0; i < valueAddedInOrder.size(); i++) { metaOut.putLong(valueAddedInOrder.getLong(i)); } }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.DELTA.getId()); metaOut.put(CompressionFactory.DELTA_ENCODING_VERSION); metaOut.putLong(base); metaOut.putInt(bitsPerValue); }
public static Supplier<ColumnarLongs> getLongSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder order, LongEncodingFormat encodingFormat, CompressionStrategy strategy ) { if (strategy == CompressionStrategy.NONE) { return new EntireLayoutColumnarLongsSupplier(totalSize, encodingFormat.getReader(fromBuffer, order)); } else { return new BlockLayoutColumnarLongsSupplier( totalSize, sizePer, fromBuffer, order, encodingFormat.getReader(fromBuffer, order), strategy ); } }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.DELTA.getId()); metaOut.put(CompressionFactory.DELTA_ENCODING_VERSION); metaOut.putLong(base); metaOut.putInt(bitsPerValue); }