VariableBlockCompressedRowStorage

VariableBlockCompressedRowStorage is a memory‑efficient storage format for block‑sparse matrices where blocks are aligned along contiguous row and column ranges. This format is particularly useful when the matrix structure naturally groups into rectangular blocks with varying sizes.

Note

The indices must be contiguous ranges for VBCRS, and no sanity check is performed during construction.

Below you will find a compact, step‑by‑step guide that shows how to

  1. Build a VBCRS matrix from a list of blocks and their starting indices.
  2. Multiply it with vectors (including transposes).
  3. Convert it from a BlockSparseMatrix.
  4. Convert it to a SparseMatrixCSC.

Constructing a VariableBlockCompressedRowStorage

The key difference from BlockSparseMatrix is that VBCRS only needs the first index of each contiguous range rather than the full list of indices.

B = BlockSparseMatrix(blocks, testindices, trialindices, sizematrix)
11250×11250 BlockSparseMatrix{ComplexF64} with 9309064 non-zero entries
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣿⣿⣛⢹⡏⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠇⢿⡇⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠀⠀
⠀⣛⣘⣿⣿⣷⣷⡆⠀⠀⣀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⢸⣿⠃⠀⠀
⠀⠭⠩⢽⣿⢿⣷⣦⣤⢠⢻⡇⠃⠀⠀⠀⠀⠙⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠈⣿⣿⣷⣿⣼⣇⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠸⠿⠃⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⢠⣤⣒⣛⣻⣿⣿⣿⣿⣿⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠭⠉⠉⢹⣿⣿⢿⣷⣶⣚⣛⠛⠸⠇⠀⠘⠃⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⣾⢿⣿⣿⣷⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣭⡅⣭⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠘⠑⠻⣿⣿⣼⣀⣀⣼⡏⠀⠀⠀⠀⠀⠉⠁⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣭⣅⠀⠀⣷⠀⠀⠀⠀⠶⠶⠆⠀⠀⠒⢻⣿⣿⣟⠛⠃⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀
⠀⠉⠉⠀⠀⠁⠀⠀⠀⠀⠀⣀⠀⠀⠀⣀⣼⣿⠙⣿⣿⡤⠿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠋⠉⠉⢀⣤⡏⢿⣷⣆⢶⣶⠞⠃⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠁⢨⣝⣿⣿⣿⣤⡄⠀⠀⣤⠠⠄⠀⠀⠀⢾⠀⠀⢸⢸⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣺⠟⠛⣿⢻⣶⣦⣀⢀⢰⠀⠀⠀⠀⠀⠈⠀⠀⠈⠈⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠇⠿⠇⠀⠀⠀⠀⠀⠉⠀⠀⠉⠈⢿⢿⣷⣿⣼⢀⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠃⠛⠃⠀⠀⠀⠀⠀⢀⠀⠀⣤⢀⣐⣛⣿⣿⣿⢸⡿⡇⠀⠀⠤⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠀⠀⠀⠰⣶⡶⣿⣿⣿⣿⣿⠿⠿⠁⠀⠀⠀
⠀⠀⠀⠀⣀⠀⠀⣶⡆⣿⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⣿⣿⣿⣿⣿⠀⢀⡀⠀⠀⠀
⠀⠀⠀⠀⠉⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⡀⠀⠀⠀⠀⡄⣿⡟⠛⠛⢿⣷⣿⣷⣆⣶⠀
⠀⠀⢠⣶⣶⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠃⠀⠰⢿⣿⣿⣿⡍⣭⠀
⠀⠀⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⣒⣒⡂⠀⠀⠀⠀⠀⠀⠀⠀⠀⢨⣽⣇⣭⣿⣿⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Here, testindices[1] and trialindices[1] show contiguous ranges for the first block

testindices[1], trialindices[1]
([1, 2, 3, 4, 5, 6, 7, 8, 9, 10  …  36, 37, 38, 39, 40, 41, 42, 43, 44, 45], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10  …  36, 37, 38, 39, 40, 41, 42, 43, 44, 45])

Now we can construct the VBCRS matrix by passing only the first index of each contiguous range

V = VariableBlockCompressedRowStorage(
    blocks, first.(testindices), first.(trialindices), sizematrix
)
11250×11250 VariableBlockCompressedRowStorage{ComplexF64} with 9309064 non-zero entries
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣿⣿⣛⢹⡏⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠇⢿⡇⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠀⠀
⠀⣛⣘⣿⣿⣷⣷⡆⠀⠀⣀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⢸⣿⠃⠀⠀
⠀⠭⠩⢽⣿⢿⣷⣦⣤⢠⢻⡇⠃⠀⠀⠀⠀⠙⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠈⣿⣿⣷⣿⣼⣇⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠸⠿⠃⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⢠⣤⣒⣛⣻⣿⣿⣿⣿⣿⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠭⠉⠉⢹⣿⣿⢿⣷⣶⣚⣛⠛⠸⠇⠀⠘⠃⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⣾⢿⣿⣿⣷⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣭⡅⣭⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠘⠑⠻⣿⣿⣼⣀⣀⣼⡏⠀⠀⠀⠀⠀⠉⠁⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣭⣅⠀⠀⣷⠀⠀⠀⠀⠶⠶⠆⠀⠀⠒⢻⣿⣿⣟⠛⠃⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀
⠀⠉⠉⠀⠀⠁⠀⠀⠀⠀⠀⣀⠀⠀⠀⣀⣼⣿⠙⣿⣿⡤⠿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠋⠉⠉⢀⣤⡏⢿⣷⣆⢶⣶⠞⠃⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠁⢨⣝⣿⣿⣿⣤⡄⠀⠀⣤⠠⠄⠀⠀⠀⢾⠀⠀⢸⢸⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣺⠟⠛⣿⢻⣶⣦⣀⢀⢰⠀⠀⠀⠀⠀⠈⠀⠀⠈⠈⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠇⠿⠇⠀⠀⠀⠀⠀⠉⠀⠀⠉⠈⢿⢿⣷⣿⣼⢀⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠃⠛⠃⠀⠀⠀⠀⠀⢀⠀⠀⣤⢀⣐⣛⣿⣿⣿⢸⡿⡇⠀⠀⠤⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠀⠀⠀⠰⣶⡶⣿⣿⣿⣿⣿⠿⠿⠁⠀⠀⠀
⠀⠀⠀⠀⣀⠀⠀⣶⡆⣿⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⣿⣿⣿⣿⣿⠀⢀⡀⠀⠀⠀
⠀⠀⠀⠀⠉⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⡀⠀⠀⠀⠀⡄⣿⡟⠛⠛⢿⣷⣿⣷⣆⣶⠀
⠀⠀⢠⣶⣶⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠃⠀⠰⢿⣿⣿⣿⡍⣭⠀
⠀⠀⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⣒⣒⡂⠀⠀⠀⠀⠀⠀⠀⠀⠀⢨⣽⣇⣭⣿⣿⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

V now behaves like a regular matrix but with significantly reduced storage overhead compared to storing full index arrays.

Matrix–Vector Products

@time V * x
@time V' * x
@time transpose(V) * x
  0.173261 seconds (424.47 k allocations: 22.299 MiB, 92.20% compilation time)
  0.083302 seconds (132.53 k allocations: 7.125 MiB, 90.89% compilation time)
  0.081576 seconds (127.95 k allocations: 6.924 MiB, 90.84% compilation time)

All three operations are implemented in pure Julia and respect the block‑sparsity, with cache-friendly access patterns due to the compressed row storage layout.

Converting Between Formats

You can directly convert a BlockSparseMatrix to VBCRS format when the index structure satisfies the contiguity requirement

B = BlockSparseMatrix(blocks, testindices, trialindices, sizematrix)

V = VariableBlockCompressedRowStorage(B)
11250×11250 VariableBlockCompressedRowStorage{ComplexF64} with 9309064 non-zero entries
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣿⣿⣛⢹⡏⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠇⢿⡇⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠀⠀
⠀⣛⣘⣿⣿⣷⣷⡆⠀⠀⣀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⢸⣿⠃⠀⠀
⠀⠭⠩⢽⣿⢿⣷⣦⣤⢠⢻⡇⠃⠀⠀⠀⠀⠙⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠈⣿⣿⣷⣿⣼⣇⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠸⠿⠃⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⢠⣤⣒⣛⣻⣿⣿⣿⣿⣿⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠉⠭⠉⠉⢹⣿⣿⢿⣷⣶⣚⣛⠛⠸⠇⠀⠘⠃⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⣾⢿⣿⣿⣷⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣭⡅⣭⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠘⠑⠻⣿⣿⣼⣀⣀⣼⡏⠀⠀⠀⠀⠀⠉⠁⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣭⣅⠀⠀⣷⠀⠀⠀⠀⠶⠶⠆⠀⠀⠒⢻⣿⣿⣟⠛⠃⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀
⠀⠉⠉⠀⠀⠁⠀⠀⠀⠀⠀⣀⠀⠀⠀⣀⣼⣿⠙⣿⣿⡤⠿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠋⠉⠉⢀⣤⡏⢿⣷⣆⢶⣶⠞⠃⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠁⢨⣝⣿⣿⣿⣤⡄⠀⠀⣤⠠⠄⠀⠀⠀⢾⠀⠀⢸⢸⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣺⠟⠛⣿⢻⣶⣦⣀⢀⢰⠀⠀⠀⠀⠀⠈⠀⠀⠈⠈⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠇⠿⠇⠀⠀⠀⠀⠀⠉⠀⠀⠉⠈⢿⢿⣷⣿⣼⢀⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠘⠃⠛⠃⠀⠀⠀⠀⠀⢀⠀⠀⣤⢀⣐⣛⣿⣿⣿⢸⡿⡇⠀⠀⠤⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡀⣀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠀⠀⠀⠰⣶⡶⣿⣿⣿⣿⣿⠿⠿⠁⠀⠀⠀
⠀⠀⠀⠀⣀⠀⠀⣶⡆⣿⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⣿⣿⣿⣿⣿⠀⢀⡀⠀⠀⠀
⠀⠀⠀⠀⠉⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⡀⠀⠀⠀⠀⡄⣿⡟⠛⠛⢿⣷⣿⣷⣆⣶⠀
⠀⠀⢠⣶⣶⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠃⠀⠰⢿⣿⣿⣿⡍⣭⠀
⠀⠀⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⣒⣒⡂⠀⠀⠀⠀⠀⠀⠀⠀⠀⢨⣽⣇⣭⣿⣿⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Note

Conversion also works with SymmetricBlockMatrix.

Sometimes you need a SparseMatrixCSC. The conversion is straightforward

V = VariableBlockCompressedRowStorage(
    blocks, first.(testindices), first.(trialindices), sizematrix
)

s = sparse(V)
11250×11250 SparseArrays.SparseMatrixCSC{ComplexF64, Int64} with 9309064 stored entries:
⎡⢿⣿⣿⡏⠿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠇⢿⡇⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⠀⎤
⎢⠸⠿⢿⣷⣷⣧⡄⠀⠀⣀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⣶⣿⠋⠀⎥
⎢⠻⠇⠽⣿⣿⣿⣧⣀⢀⣻⡇⠂⠀⠀⠀⠀⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠉⠉⣻⣿⣿⣿⣿⣇⣀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⢸⣿⠃⠀⠉⠀⠀⠀⎥
⎢⠀⠀⠀⢠⣤⣰⣿⣿⣿⣿⣯⣭⢭⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠛⠛⠛⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠉⠩⠉⠉⢹⡏⣿⢿⣷⣴⣚⣘⡛⠸⠇⠀⠘⠃⠀⠀⠀⠀⠀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠐⠃⠓⣶⢿⣿⣿⣷⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣭⡝⡇⠀⠀⠘⠃⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⠸⠱⠿⢻⣶⣴⣀⣀⣼⡟⠀⠀⠀⠀⠘⠋⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⣭⣅⠀⠀⣿⠀⠀⠀⠀⠶⠶⠆⠀⠀⠐⠛⣿⣿⣟⠛⠃⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⎥
⎢⠉⠉⠀⠀⠉⠀⠀⠀⠀⠀⣀⠀⠀⠀⣀⣼⣿⠙⣿⣿⡤⠿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠛⠉⠉⢀⣤⡏⢿⣷⣆⢶⣶⠞⠃⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠁⢨⣝⣿⣿⣯⣤⠀⠀⢠⣤⠠⠀⠀⠀⠀⢾⠀⠀⢻⣿⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⣻⠟⠛⣿⢻⣷⣤⣤⣤⣴⠀⠀⠀⠀⠀⠈⠀⠀⠈⠉⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⢸⣇⠿⠏⠀⠀⠀⠀⠀⠉⠀⠀⠀⠀⣿⣿⣿⣿⣿⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⢀⠀⠀⣶⢀⣿⣿⣿⣿⣿⣾⠟⠇⣀⣀⣶⣀⡀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⣤⣤⣤⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⢸⣾⠟⢿⣷⣿⣭⠍⠛⠋⠁⠀⠀⎥
⎢⠀⠀⠀⣀⠀⠀⣶⣶⣿⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⢱⡟⣿⣿⣿⣷⠀⣀⡀⠀⠀⎥
⎢⠀⠀⠀⠉⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⡀⠀⠀⠀⢠⣼⣧⠁⠉⠛⢿⣷⣿⣗⢐⣂⎥
⎢⠀⣠⣼⣿⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠏⠀⠀⠸⢿⢿⣿⣿⣬⡍⎥
⎣⠀⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⣿⣶⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣰⣆⣿⣿⣷⎦

The VBCRS format is particularly memory‑efficient for this storage pattern, as it only stores the starting index of each contiguous block range rather than explicit lists of all indices.