blob: 7e609e9506ef59ecba947a476ad82b2e280c596b [file] [log] [blame]
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'
};