public BlockLayoutColumnarDoublesSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder byteOrder, CompressionStrategy strategy ) { baseDoubleBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(byteOrder, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; }
public BlockLayoutColumnarFloatsSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder byteOrder, CompressionStrategy strategy ) { baseFloatBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(byteOrder, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; }
public BlockLayoutColumnarLongsSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder order, CompressionFactory.LongEncodingReader reader, CompressionStrategy strategy ) { baseLongBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(order, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; this.baseReader = reader; }
public static CompressedColumnarIntsSupplier fromByteBuffer(ByteBuffer buffer, ByteOrder order) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == VERSION) { final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); final CompressionStrategy compression = CompressionStrategy.forId(buffer.get()); return new CompressedColumnarIntsSupplier( totalSize, sizePer, GenericIndexed.read(buffer, new DecompressingByteBufferObjectStrategy(order, compression)), compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }
public static CompressedVSizeColumnarIntsSupplier fromByteBuffer( ByteBuffer buffer, ByteOrder order ) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == VERSION) { final int numBytes = buffer.get(); final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); final CompressionStrategy compression = CompressionStrategy.forId(buffer.get()); return new CompressedVSizeColumnarIntsSupplier( totalSize, sizePer, numBytes, GenericIndexed.read(buffer, new DecompressingByteBufferObjectStrategy(order, compression)), compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }
static GenericIndexed<ResourceHolder<ByteBuffer>> ofCompressedByteBuffers( Iterable<ByteBuffer> buffers, CompressionStrategy compression, int bufferSize, ByteOrder order, Closer closer ) { return fromIterableVersionOne( buffers, GenericIndexedWriter.compressedByteBuffersWriteObjectStrategy(compression, bufferSize, closer), false, new DecompressingByteBufferObjectStrategy(order, compression) ); }
public BlockLayoutColumnarDoublesSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder byteOrder, CompressionStrategy strategy ) { baseDoubleBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(byteOrder, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; }
public BlockLayoutColumnarFloatsSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder byteOrder, CompressionStrategy strategy ) { baseFloatBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(byteOrder, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; }
public BlockLayoutColumnarLongsSupplier( int totalSize, int sizePer, ByteBuffer fromBuffer, ByteOrder order, CompressionFactory.LongEncodingReader reader, CompressionStrategy strategy ) { baseLongBuffers = GenericIndexed.read(fromBuffer, new DecompressingByteBufferObjectStrategy(order, strategy)); this.totalSize = totalSize; this.sizePer = sizePer; this.baseReader = reader; }
public static CompressedColumnarIntsSupplier fromByteBuffer(ByteBuffer buffer, ByteOrder order) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == VERSION) { final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); final CompressionStrategy compression = CompressionStrategy.forId(buffer.get()); return new CompressedColumnarIntsSupplier( totalSize, sizePer, GenericIndexed.read(buffer, new DecompressingByteBufferObjectStrategy(order, compression)), compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }
public static CompressedVSizeColumnarIntsSupplier fromByteBuffer( ByteBuffer buffer, ByteOrder order ) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == VERSION) { final int numBytes = buffer.get(); final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); final CompressionStrategy compression = CompressionStrategy.forId(buffer.get()); return new CompressedVSizeColumnarIntsSupplier( totalSize, sizePer, numBytes, GenericIndexed.read(buffer, new DecompressingByteBufferObjectStrategy(order, compression)), compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }
static GenericIndexed<ResourceHolder<ByteBuffer>> ofCompressedByteBuffers( Iterable<ByteBuffer> buffers, CompressionStrategy compression, int bufferSize, ByteOrder order, Closer closer ) { return fromIterableVersionOne( buffers, GenericIndexedWriter.compressedByteBuffersWriteObjectStrategy(compression, bufferSize, closer), false, new DecompressingByteBufferObjectStrategy(order, compression) ); }