• antirez's avatar
    Streams: items compression implemented. · 3f2d7e27
    antirez authored
    The approach used is to set a fixed header at the start of every
    listpack blob (that contains many entries). The header contains a
    "master" ID and fields, that are initially just obtained from the first
    entry inserted in the listpack, so that the first enty is always well
    compressed. Later every new entry is checked against these fields, and
    if it matches, the SAMEFIELD flag is set in the entry so that we know to
    just use the master entry flags. The IDs are always delta-encoded
    against the first entry. This approach avoids cascading effects in which
    entries are encoded depending on the previous entries, in order to avoid
    complexity and rewritings of the data when data is removed in the middle
    (which is a planned feature).
    3f2d7e27
stream.h 2.64 KB