class AppendOnlyValuesContainer implements ValuesContainer {

    @Nonnull
    @Override
    public Value get( long ref )
    {
        assertNotClosed();
        final int chunkIdx = (int) (ref >>> 32);
        int offset = (int) ref;

        checkArgument( chunkIdx >= 0 && chunkIdx < chunks.size(), "invalid chunk idx %d (total #%d chunks), ref: 0x%X", chunkIdx, chunks.size(), ref );
        final ByteBuffer chunk = chunks.get( chunkIdx );
        checkArgument( offset >= 0 && offset < chunk.position(), "invalid chunk offset (%d), ref: 0x%X", offset, ref );
        final int typeId = chunk.get( offset ) & 0xFF;
        checkArgument( typeId != REMOVED, "element is already removed, ref: 0x%X", ref );
        checkArgument( typeId < VALUE_TYPES.length, "invaling typeId (%d) for ref 0x%X", typeId, ref );
        offset++;

        final ValueType type = VALUE_TYPES[typeId];
        return type.getReader().read( chunk, offset );
    }

    public  AppendOnlyValuesContainer( MemoryAllocator allocator );
    @VisibleForTesting  AppendOnlyValuesContainer( int chunkSize, MemoryAllocator allocator );

}