X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=turbopfor-encode.h;h=9341efc0b7f4c23552f29dbd115bac508eb6cc1d;hb=bd214715b9a8cf89cd51d62acb6efe137f63f570;hp=e6e3cd5f13129767fef24bda95420b5cf1be9c35;hpb=e10f92d401f89b610a091623a7005aeeb243e4f9;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. }