power_play/src/tar.h
2025-07-25 13:43:47 -05:00

25 lines
554 B
C

#ifndef TAR_H
#define TAR_H
#include "util.h"
struct tar_entry {
b32 valid;
struct string file_name;
struct string data;
b32 is_dir;
struct tar_entry *next;
struct tar_entry *next_child; /* If entry is dir, points to first child. Otherwise points to next sibling. */
};
struct tar_archive {
struct dict *lookup;
struct tar_entry *head;
};
struct tar_archive tar_parse(struct arena *arena, struct string data, struct string prefix);
struct tar_entry *tar_get(struct tar_archive *archive, struct string name);
#endif