blob: b35262a47981dd08a69e628506985699b53ea4e6 [file]
export default {
encode: function (decodedKey) {
return '\xff' + decodedKey[0] + '\xff' + decodedKey[1];
},
decode: function (encodedKeyAsBuffer) {
var str = encodedKeyAsBuffer.toString();
var idx = str.indexOf('\xff', 1);
return [str.substring(1, idx), str.substring(idx + 1)];
},
lowerBound: '\x00',
upperBound: '\xff'
};