tree-buf icon indicating copy to clipboard operation
tree-buf copied to clipboard

Question about array handling

Open jgarvin opened this issue 2 years ago • 1 comments

I think the separate compression for each path is interesting but I couldn't tell from the README how it gets applied to arrays. If I have a sequence of messages and there is an array field, is every index of the array considered the leaf of a different path, or are the arrays concatenated for purposes of compression or ...?

jgarvin avatar Apr 21 '23 04:04 jgarvin

The arrays are concatenated for purposes of compression. There is a separate path for the length of the arrays to compress as well. So, imagine you have [[0, 1, 2], [2, 2, 3], [1]]. This becomes: lengths: [3, 3, 1], data: [0, 1, 2, 2, 2, 3, 1].

That3Percent avatar Apr 21 '23 04:04 That3Percent