We will be storing raw nostr bech32 buffers directly into nostrdb, so adapt our bech32 code to reflect this. When doing our content parsing pass, we will only look for strings and we won't allocate any intermediate buffers. Only when we write this string block to nostrdb will we actually allocate in our nostrdb output buffer (no mallocs!) Signed-off-by: William Casarin <jb55@jb55.com>
13 lines
136 B
C
13 lines
136 B
C
|
|
#ifndef NDB_STR_BLOCK_H
|
|
#define NDB_STR_BLOCK_H
|
|
|
|
#include <inttypes.h>
|
|
|
|
struct str_block {
|
|
const char *str;
|
|
uint32_t len;
|
|
};
|
|
|
|
#endif
|