tracker
All repositories: gitoria
1.1 KB
// UTF-8 ID/key pairs with numeric boundaries. length uses the catalog's two slots per row.payload = toBytes(0)bounds = []length = 0waste = 0fetch(Number i) {row = (i - i % 2) / 2at = row * 3 + i % 2return payload.text(bounds[at], bounds[at + 1])}insert(Number i, String id, String key) {a = toBytes(id)b = toBytes(key)start = payload.lengthpayload.append(&a)middle = payload.lengthpayload.append(&b)at = i / 2 * 3bounds.splice(at, 0, payload.length)bounds.splice(at, 0, middle)bounds.splice(at, 0, start)length = length + 2return null}remove(Number i) {at = i / 2 * 3waste = waste + bounds[at + 2] - bounds[at]bounds.splice(at, 3)length = length - 2if (waste > 1048576 && waste * 2 > payload.length) { compact() }return null}compact() {out = toBytes(0)for (let i = 0; i < bounds.length; i = i + 3) {id = toBytes(payload.text(bounds[i], bounds[i + 1]))key = toBytes(payload.text(bounds[i + 1], bounds[i + 2]))bounds[i] = out.lengthout.append(&id)bounds[i + 1] = out.lengthout.append(&key)bounds[i + 2] = out.length}payload = outwaste = 0return null}
Branches
Latest commits
- 6d05fa37Log: HM50 Part A mergedmre
- 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
- e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
- 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre
- 1c4715a4RT50 mission: day50 repro retestmre
- 57d1c0dcLog: day50 retest requestmre
- 60b1f419Log: Anton #336 result, wake checkmre
- 919a18aalog: scratchmre
- 6b504440status tidymre
- 9332bd10log: DP70 livemre
- be11daa0DP70 brief fixmre
- 886a7028DP70 brief, HM67 mergedmre
- b41cdd6dMerge hm67-searchids: packed search IDsmre
- 385904eaReport HM67 matched heap measurements and gate proofmre
- e5c9b659Pack retained search IDs into UTF-8 bytesmre
- 62a5f6c7HM67 brief, HM66 mergedmre