[ot][spam][crazy] log 2: append-only random writes

Undiscussed Horrific Abuse, One Victim of Many gmkarl at gmail.com
Sun Jul 10 07:09:22 PDT 2022


class Data:
    def __init__(self, offset, data, end = None):
        self.start = offset
        self.data = data
        if end is None:
            self.end = self.start + len(self.data)
class Flush:
    def __init__(self, parent = None):
        self.parent = parent
        if self.parent is not None:
            self.index = [self.parent]
            # this should expand self.parent if it's too deep, and
shallow it if there is only one child
        else:
            self.index = []
    def write(self, offset, data):
        # 1. trim index to left and right of data
        # 2. remove items in between and replace with data


More information about the cypherpunks mailing list