X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=turbopfor-encode.h;h=9341efc0b7f4c23552f29dbd115bac508eb6cc1d;hb=8c40d71acb262d9efe84af89e28a448bddadbabe;hp=e6e3cd5f13129767fef24bda95420b5cf1be9c35;hpb=8c55aee2b5a22c067989043e5adb1cfce4ffddbf;p=plocate diff --git a/turbopfor-encode.h b/turbopfor-encode.h index e6e3cd5..9341efc 100644 --- a/turbopfor-encode.h +++ b/turbopfor-encode.h @@ -52,6 +52,12 @@ unsigned char *write_baseval(Docid in, unsigned char *out) out[1] = in & 0xff; out[2] = (in >> 8) & 0xff; return out + 3; + } else if (in < 0x10000000) { + out[0] = (in >> 24) | 0xe0; + out[1] = (in >> 16) & 0xff; + out[2] = (in >> 8) & 0xff; + out[3] = in & 0xff; + return out + 4; } else { assert(false); // Not implemented. }