I am trying to save the IDE data in mongoDB. What I am planning to do is after a room ends get the code from mongoDB collection for which I used y-mongodb and then save that data in another collection and delete the current document.
const persistedYdoc = await ldb.getYDoc(docName);
const newUpdates = Y.encodeStateAsUpdate(persistedYdoc);
My newUpdates are logged as:
Uint8Array(188) [
5, 1, 172, 227, 196, 139, 15, 0, 132, 188, 169, 142,
176, 12, 37, 8, 10, 10, 100, 119, 101, 100, 119, 101,
1, 206, 185, 147, 175, 14, 0, 132, 195, 149, 249, 240,
8, 28, 9, 10, 100, 10, 119, 101, 100, 119, 101, 100,
1, 188, 169, 142, 176, 12, 0, 132, 206, 185, 147, 175,
14, 8, 38, 10, 100, 115, 102, 97, 115, 100, 102, 115,
100, 102, 10, 115, 100, 10, 102, 115, 100, 102, 100, 102,
115, 10, 100, 102, 10, 97, 115, 100, 10, 102, 97, 115,
100, 102, 115, 100,
Document stored in mongoDb as
I need help decoding the value from the given format.