#ifndef RECORD_H
#define RECORD_H
#include "basics.h"
#include "system.h"
#include <stdint.h>
#include "reftable-record.h"
struct string_view { … };
static inline void string_view_consume(struct string_view *s, int n)
{ … }
int get_var_int(uint64_t *dest, struct string_view *in);
int put_var_int(struct string_view *dest, uint64_t val);
struct reftable_record_vtable { … };
int reftable_is_block_type(uint8_t typ);
int reftable_encode_key(int *is_restart, struct string_view dest,
struct reftable_buf prev_key, struct reftable_buf key,
uint8_t extra);
int reftable_decode_keylen(struct string_view in,
uint64_t *prefix_len,
uint64_t *suffix_len,
uint8_t *extra);
int reftable_decode_key(struct reftable_buf *last_key, uint8_t *extra,
struct string_view in);
struct reftable_index_record { … };
struct reftable_obj_record { … };
struct reftable_record { … };
void reftable_record_init(struct reftable_record *rec, uint8_t typ);
int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b);
int reftable_record_equal(struct reftable_record *a, struct reftable_record *b, int hash_size);
int reftable_record_key(struct reftable_record *rec, struct reftable_buf *dest);
int reftable_record_copy_from(struct reftable_record *rec,
struct reftable_record *src, int hash_size);
uint8_t reftable_record_val_type(struct reftable_record *rec);
int reftable_record_encode(struct reftable_record *rec, struct string_view dest,
int hash_size);
int reftable_record_decode(struct reftable_record *rec, struct reftable_buf key,
uint8_t extra, struct string_view src,
int hash_size, struct reftable_buf *scratch);
int reftable_record_is_deletion(struct reftable_record *rec);
static inline uint8_t reftable_record_type(struct reftable_record *rec)
{ … }
void reftable_record_release(struct reftable_record *rec);
int reftable_ref_record_compare_name(const void *a, const void *b);
int reftable_log_record_compare_key(const void *a, const void *b);
#endif