diff --git a/ext/MaskedVByte/include/varintencode.h b/ext/MaskedVByte/include/varintencode.h new file mode 100644 index 0000000..2183968 --- /dev/null +++ b/ext/MaskedVByte/include/varintencode.h @@ -0,0 +1,18 @@ + +#ifndef VARINTENCODE_H_ +#define VARINTENCODE_H_ + +#include // please use a C99-compatible compiler +#include + +// Encode an array of a given length read from in to bout in varint format. +// Returns the number of bytes written. +size_t vbyte_encode(uint32_t *in, size_t length, uint8_t *bout); + +// Encode an array of a given length read from in to bout in varint format with differential +// coding starting at value prev. (Setting prev to 0 is a good default.) +// Returns the number of bytes written. +size_t vbyte_encode_delta(uint32_t *in, size_t length, uint8_t *bout, uint32_t prev); + + +#endif /* VARINTENCODE_H_ */