Le 15/09/2022 à 10:14, Micah Kornfield a écrit :
I agree slicing can be tricky here.  Since slicing is not part of the
specification, maybe there should be two separate discussions here.  I'll
be honest, I forget exactly how slicing works in the C++ implementation,
but is

Slicing is part of the C data interface (with the offset member).

Say you have the logical values: [5, 5, 5, 6, 6, 7, 7, 7]

Run ends: [3, 5, 8]
Values: [5, 6, 7]

So a slice at 4 would be:
Run ends: [5, 8]
Values: [6, 7]

How do you interpret that?
Naively, that means the logical values [6, 6, 6, 6, 6, 7, 7, 7]
It doesn't seem right...

For Lookup of elements one could add the logical offset to the index and to
the binary search as normal.

Right. But that implies we just have a logical offset and no physical offset. Which is probably fine to me, but not what Weston proposed AFAIU :-)

I guess this might be harder to implement based on the current slicing
implementation?  Or I might be missing something obvious?

Well, in any case, slicing will be more involved for RLE than it is for other data types or encodings...

Regards

Antoine.

Reply via email to