Add filesystem index to ZipOS

This change brings the /zip/... read-only filesystem into performance
parity with the native Linux filesystem which doesn't use compression
therefore, imagine how much faster this could be with bloom filtering
rather than simple binary search, and if we used zstd instead of zlib
This commit is contained in:
Justine Tunney 2023-08-18 07:04:55 -07:00
parent 7100b1cf91
commit 5b42c810a5
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
7 changed files with 93 additions and 25 deletions

View file

@ -35,6 +35,8 @@ struct Zipos {
uint8_t *map;
uint8_t *cdir;
uint64_t dev;
size_t *index;
size_t records;
struct ZiposHandle *freelist;
};
@ -45,6 +47,7 @@ void __zipos_free(struct ZiposHandle *);
struct Zipos *__zipos_get(void) pureconst;
size_t __zipos_normpath(char *, const char *, size_t);
ssize_t __zipos_find(struct Zipos *, struct ZiposUri *);
ssize_t __zipos_scan(struct Zipos *, struct ZiposUri *);
ssize_t __zipos_parseuri(const char *, struct ZiposUri *);
uint64_t __zipos_inode(struct Zipos *, int64_t, const void *, size_t);
int __zipos_open(struct ZiposUri *, int);