compact prefix tree in leveldb