sext
sext copied to clipboard
prefix encode for binaries
is it possible to do prefix encode so that prefix(<<"ab">>) would be the exact prefix of prefix(<<"abc">>)? I see it could be done for lists.
And also prefix([term, <<"ab">>]) as a prefix for prefix([term, <<"abc">>])
It's a problem. I did a form of prefix encoding of binaries for the kvdb database:
https://github.com/Feuerlabs/kvdb/blob/master/src/kvdb_lib.erl#L261
...but I haven't tried to integrate it into sext.