struct dynbuf
{
    size_t len;
    size_t count;
    char buf[];
};

struct dynbuf* db_extend(struct dynbuf* db, char* buf, size_t len);
struct dynbuf* db_init(size_t len);
short dynbuf_destroy(struct dynbuf* db);
