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
- 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
- b32b8440Merge hm66-catalogindex: packed catalog indexmre
- 2db0f7adReport HM66 heap measurements and validationmre
- 6ce15623Pack catalog lists and membership maps in UTF-8 bytesmre
- 71134e21HM66 briefmre
- ed4cbab2status timemre
- e982c26dlog: HM65 mergedmre
- 6e72f9d1Merge hm65-fields: episode boot scan reads three fieldsmre
- 07a5c883HM65 report measured field projection and complete validationmre
- 0eab858fRead only catalog date fields during the episode boot scanmre
- d3179273log: HM65 hl:heap vendoringmre
- cb78a1a0HM65 report missing heap diagnostic package with repromre
- 89606a5cHM65 briefmre
- 096ce0d4log: DP69 live on day48mre