This API needs to be lifted to IRawStore so it can be used for general B+Tree node/leaf compression.
We should discuss the case of the IndexSegmentStore in this regard. It might be either simple or quite tricky. I can't say until I look at it. The reason to support this API there is for consistency in B+tree compression.