From 3c8cc4e887c861c392223a54fd5be2b49db29874 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 28 Sep 2026 11:12:37 +0100 Subject: Write list images a chunk at a time, and keep the log within the lists' size --- core/module-list.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/module-list.h') diff --git a/core/module-list.h b/core/module-list.h index ec7ee10..faacf4b 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -96,6 +96,10 @@ PureResult pure_list_sorted(const PureList *, unsigned field, PureList **out, si * pure_list_encode writes them to out. */ size_t pure_list_size(const PureList *); void pure_list_encode(const PureList *, unsigned char *out); +/* The items from position *at on, as many whole ones as capacity holds, + * into out: their bytes (0 at the end, or with *needed the bytes of the one + * item that does not fit), *at moved past them. */ +size_t pure_list_encode_part(const PureList *, size_t *at, unsigned char *out, size_t capacity, size_t *needed); /* Append the items stored in bytes; each field is checked. */ PureResult pure_list_read(PureList *, const unsigned char *bytes, size_t size); /* A stored list journals its changes (from pure_list_journal(list, true) -- cgit v1.2.3