add a function for range deleting chunks

This commit is contained in:
2025-08-27 14:37:41 +02:00
parent 2c5b9def28
commit 7531d786be
2 changed files with 22 additions and 0 deletions

View File

@@ -17,6 +17,9 @@ struct mcx_chunk {
/* Deletes chunk `idx` from `buf`, moving all chunks downwards in the process. */
size_t mcx_delchunk(u8 *restrict buf, int idx) NONNULL((1));
/* Deletes a range of chunks from index `start` to `end`. */
size_t mcx_delchunk_range(u8 *restrict buf, int start, int end) NONNULL((1));
/* Deletes `chunkc` chunks specified in `chunks` from the `*.mcX` file.
* This is done in a way to perform minimal memmove operations. */
size_t mcx_delchunk_bulk(u8 *restrict buf, const u16 *restrict chunks, int chunkc) NONNULL((1, 2));