Conversation

Jarkko Sakkinen

Edited 14 hours ago

“nippu - does one thing right”

https://codeberg.org/jarkko/nippu

I just need something simple and stupid as it is quite often :-)

I.e.,

#include <stdio.h>
#include <nippu/nippu.h>

int main(void)
{
	const struct nippu_node *node;
	const unsigned char *data;

	if (nippu_lookup(&assets, "/hello.txt", &node) != NIPPU_SUCCESS)
		return 1;
	if (!nippu_is_file(node))
		return 1;

	data = nippu_data(&assets, node);
	fwrite(data, 1, (size_t)nippu_size(node), stdout);
	return 0;
}
1
0
0
And "designed for Lua" i.e., the reason why it has files and folders is the direct mapping to Lua's table hierarchy.
0
0
0